关于showModalDialog窗口刷新父页面的问题 window.parent.location=window.parent.location.href;window.close(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 抱歉,如果你是用 window.open 開啟窗口的話,要改用:window.parent.location=window.parent.location.href;window.close(); 抱歉,抱歉,上面一篇又打錯,如果你是用 window.open 開啟窗口的話,要改用 opener 的方式才對: window.opener.location=window.opener.location.href;window.close(); 不是用WINDOW.Open开的这样:window.showModalDialog('mainrepair.asp?repair='+thisvalue+'&id='+id+'&refresh='+number,'_blank','dialogLeft:400px;dialogtop:400px;dialogwidth:'+widthp+'px;dialogheight:'+heightp+'px;status=0;scroll=0'); 模态对话框是不能用opener引用父窗口的,而是需要父窗口主动传递指针变量的 这个window.showModalDialog有第二个参数,就是做这个用的,你需要把window穿过去,就是这样 var returnValue=showModalDialog('2.html',window,'dialogWidth:520px;dialogHeight:510px;help:no;center:yes;resizable:no;status:no;scroll:no'); 这样在对话框中就可以引用父窗口对象,怎么引用呢,通过window.dialogArguments就可以应用父窗口了。 在body里面加上location <body onUnload="window.dialogArguments.location.reload()"> javascirpt日期问题? 大家喜欢用javascript还是jquery??? 急!关于js/jquery click的问题 JAVASCRIPT子窗口返值回父窗口的问题 大虾救命,下拉式菜单 急急! 求在js做的树节点上右键弹出菜单 且菜单里面的选项可实现页面跳转 如何使用Venkman? 帮我看看这段代码,又哪出错了? 菜鸟问:如何实现文字上滚的特效 请问下面这条语句是什么意思?谢谢~ 创建元素时的问题 一个关于复选框的问题
window.parent.location=window.parent.location.href;
window.close();
window.opener.location=window.opener.location.href;
window.close();
这样:
window.showModalDialog('mainrepair.asp?repair='+thisvalue+'&id='+id+'&refresh='+number,'_blank','dialogLeft:400px;dialogtop:400px;dialogwidth:'+widthp+'px;dialogheight:'+heightp+'px;status=0;scroll=0');
这个window.showModalDialog有第二个参数,就是做这个用的,你需要把window穿过去,就是这样
var returnValue=showModalDialog('2.html',window,'dialogWidth:520px;dialogHeight:510px;help:no;center:yes;resizable:no;status:no;scroll:no');
这样在对话框中就可以引用父窗口对象,怎么引用呢,通过window.dialogArguments就可以应用父窗口了。
在body里面加上location <body onUnload="window.dialogArguments.location.reload()">