我已经添加了一个iframe的(ivuFrm_page0ivu1)内容的链接元素,并希望删除这些选择按钮。我使用的代码如下:
function removeAddedElements(){
console.log("called removeAddedElements()");
$("#ivuFrm_page0ivu1").contents().find(".linkUp").each(function (index, element) {
$(this).remove
console.log("removed one linkUp");
});
}
它迭代我拥有的四个元素,但不删除它们。它们能被人看见。我怎么才能移除这些?
发布于 2015-08-05 14:06:29
.remove
不是jquery
中的有效函数。试试$(this).remove()
function removeAddedElements(){
console.log("called removeAddedElements()");
$("#ivuFrm_page0ivu1").contents().find(".linkUp").each(function (index, element) {
$(this).remove()
console.log("removed one linkUp");
});
}
https://stackoverflow.com/questions/31834826
复制相似问题