在iframe的父页面中定义函数:
function closeIFrame(){ console.log("关闭子页面"); $(‘#youriframeid‘).remove(); }
然后在iframe标签调用
parent.closeIFrame();
在iframe中关闭/删除iframe标签
原文:http://www.cnblogs.com/shenzaifang/p/7515686.html