如何使用 javascript 或 jQuery 关闭 iframe 本身内的 iframe?我试过了 <a href="javascript:self.close()">
但它没有用。
最佳答案
“关闭”当前 iFrame 是不可能的,但您可以告诉父级操作 dom 并使其不可见。
在 IFrame 中:
parent.closeIFrame();
在 parent 中:
function closeIFrame(){
$('#youriframeid').remove();
}
关于javascript - 如何关闭 iframe 本身内的 iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6754935/