如何关闭showModalDialog打开的窗口
function showpage()
{
return(showModalDialog("suo/jzindex.asp","dialogWidth:350px; dialogHeight:250px; help:no; resizable:no; scroll:no; status:no"));
window.close();
}
相关推荐
JS中showModalDialog关闭子窗口刷新主窗口用法详解
主要介绍了JS中showModalDialog关闭子窗口刷新主窗口用法,结合具体实例形式较为详细的分析了showModalDialog常见用法与相关使用技巧,需要的朋友可以参考下
showModalDialog和showModelessDialog的用法
showModalDialog和showModelessDialog的用法,彼此之间有什么不同? 用事例进行说明。 如:对话框赋给父页面的值 步骤一:父页面CS文件Page_load中执行脚本(打开对话框) Button1.Attributes.Add("onclick","window.showModalDialog('../Dialog/DialogForm.aspx',window)"); 步骤二:父页面页面脚本函数。 function setAttaches(strboxValue) { document.getElementById("lblSign").value=strboxValue; } 步骤三 Button2.Attributes.Add("onclick", "closeWin2('"+lblreturn.Text+"');"); function closeWin2(strboxValue) { var parWin = window.dialogArguments; parWin.setAttaches(strboxValue); window.close(); }
javascript showModalDialog,open取得父窗口的方法
通常使用window.open的方式开启新窗口的话 要取得父窗口的控件,可以用window.opener来取得父窗口 然而如果使用showModalDialog的话…却无效 如果有需要的话,需要修改开启的语法以及showModalDialog中的语法 开启语法第2个参数请下self,范例如下 var rc=window.showModalDialog(strURL,self,sFeatures); 然后接着就是呼叫父窗口的语法 var pWindow=window.dialogArguments; 这样就可以取得父窗口的window对象控制了。例如: window.dialogArgument
window.showModalDialog的基本用法
window.showModalDialog的基本用法
javascript打开静态子窗口
javascript打开静态子窗口javascript打开静态子窗口


