在页面中有个iframe 1
<iframe id="iframe1" src="${ctx}/product/list/" width="100%" height="91%" frameborder="0"></iframe>
而在list页面中有个方法mode,通过mode打开了另一个iframe2。
function mode(href){
top.$.jBox.open('iframe:'+href,'修改产品库存',$(top.document).width()-220,$(top.document).height()-180,{
buttons:{"关闭":true}});}
现在想在再iframe2 中再点击保存后刷新iframe1 页面和关闭iframe2 页面。
<c:if test="${fresh}">
//刷新iframe1 页面
top.mainFrame.document.getElementById("iframe1").contentWindow.location.reload();
//关闭jbox打开的iframe2
window.parent.window.jBox.close();
</c:if>
后台传一个fresh 变量,控制保存后才刷新iframe1 和关闭iframe2.