关于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()"> 求段js代码——在线等 随手记下的笔记 window.showModalDialog的status网址怎样改成其他文字? js操作word的问题 js中如何把selected传递到option上 ie8中jquery提交表单时不提交input 如何获取<div></div>之间的文本内容? 大家帮帮忙select的问题。 求助各位大虾! 用javascript怎样判断一个日期是否大于另一个日期? 创建元素时的问题 一个关于复选框的问题
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()">