84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
var p = $("p:first").remove(); p.css('color','red').text('p1通过remove处理后,点击该元素,事件丢失') $("body").append(p);
以上代码,p首先被移除掉了,自身元素p标签也应该将移除了,可是为什么p又重新设置样式及内容的时候却还是会是p标签呢
好好学习,天天向上!!!
What is the difference between detach() and remove()? -PHP Chinese website Q&A-What is the difference between detach() and remove()? -PHP Chinese website Q&A
Please watch and learn.
这个方法不会把匹配的元素从jQuery对象中删除,因而可以在将来再使用这些匹配的元素。但除了这个元素本身得以保留之外,其他的比如绑定的事件,附加的数据等都会被移除
What is the difference between detach() and remove()? -PHP Chinese website Q&A-What is the difference between detach() and remove()? -PHP Chinese website Q&A
Please watch and learn.
这个方法不会把匹配的元素从jQuery对象中删除,因而可以在将来再使用这些匹配的元素。但除了这个元素本身得以保留之外,其他的比如绑定的事件,附加的数据等都会被移除