父窗口将window对象作为参数传入
sReturn = showModalDialog("xxx.htm", self, '');子窗口中取window参数,然后同样按照DOM取控件
win = window.dialogArguments;
win.document.getElementById("xxx");
sReturn = showModalDialog("xxx.htm", self, '');子窗口中取window参数,然后同样按照DOM取控件
win = window.dialogArguments;
win.document.getElementById("xxx");
window.showModalDialog("b.html", test1)然后在子窗口 取参数var id = window.dialogArguments; id.document.getElementById("id") 的方法调用。
window.showModalDialog("b.html", test1)
这句话是什么 意思? test1 是干嘛用的?
任何类型都可以,你要调用按钮就把按钮当作第二个参数传进去,
在子页面用window.dialogArguments接收就行勒~
id就是父页面的按钮ID
win=window.showModelessDialog("b.html",window,"dialogWidth=200px;dialogHeight=200px;status=0;scroll=no") b.html 中调用父窗口对象:
window.dialogArguments.对象ID;
貌似直接用 parent.对象ID 就可以调用捏。 楼主试下,记不清楚了。
window.dialogArguments.document.getElementById("<%=sCWaRiTsuKeButton.ClientID%>").click(); sCWaRiTsuKeButton 是 父頁面 的的 一個按鈕 并且 runat=‘server’
直接取生成的html控件ID
服务器控件,如果是.net,win.document.getElementById("<%sCWaRiTsuKeButton.ClientID%>")