jquery中有一个很棒的方法,叫做wrap(),它会将一个选定的元素包装在一个新元素中,如下所示: <p>I wish I was wrapped!</p> $("p").wrap("<div></div>");<div><p>I wish I was wrapped!</p></div>
但我需要的是一些可以展开的东西,这样上面的过程就会颠倒过来。问题似乎是,当你选择一个坏的项目(比如说一个不必要的表)时,它总是会抓取
article.product-miniature.js-product-miniature ~ div article.product-miniature.js-product-miniature').unwrap如果我在控制台中这样做,首先使用.append().load()输入命令并运行它,然后.unwrap() --它运行得很好--如果我同时插入和运行这两个命令--尽管它不工作--这与我的.js文件中发生的事情是一样的article.product-miniature.js-product-miniature ~ div article.p
read_to_string found for type std::result::Result<std::fs::File, std::io::Error> in the current scopeuse std::fs::File;
let mut f = File::open("D:/test/rust/io.txt").unwrap::io::prelude::*;
use std::fs::F