$(this).nextAll().find("iframe").remove();
$(this).nextAll("iframe").remove();
$(this).nextAll().remove("iframe");
为什么只有第三句能删掉???????(this是iframe前面的一个元素)
有区别吗????
jQuery的Dom操作问题问题问题问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- Go 旅城通票 2015-04-15 09:00关注
$(this).nextAll().find("iframe").remove(); 这个是在this对象的同级节点下找iframe
$(this).nextAll("iframe").remove(); 这个是找this对象同级节点后的iframe节点,应该是可以删除this后的iframe的
$(this).nextAll().remove("iframe");这个是第二句效果效果类似
解决 无用评论 打赏 举报