如何通过js提交iframe里的action,并刷新上级页面

如题所述

给你的iframe标签加name属性
<iframe id="myframe" name="myframe"></frame>

主页面的中提交iframe页面里的form
window.frames["myframe"].forms["formname"].submit();

iframe页面中刷新父页面
window.parent.location.reload(true);
温馨提示:答案为网友推荐,仅供参考
相似回答