日期:2014-05-17 浏览次数:20718 次
<HTML> <HEAD> <TITLE>showModelessDialogEX.htm</TITLE> <SCRIPT> var sUserName=""; function fnCallDialog() { showModalDialog("b.html",window,"status:false;dialogWidth:300px;dialogHeight:300px"); } function fnUpdate() { oName.innerText = sUserName; } </SCRIPT> </HEAD> <BODY> <P>Enter your first name: <SPAN ID="oName" STYLE="color:red;font-size:24">Joan</SPAN></P> <INPUT TYPE="button" VALUE="Display Modeless Dialog" onClick="fnCallDialog()"> </BODY> </HTML>
<HTML> <HEAD> <TITLE>myDialog.htm</TITLE> <SCRIPT> function fnGetInfo() { var sData = dialogArguments; //父窗口 sData.sUserName = oEnterName.value; sData.fnUpdate(); } function fnCancel() { var sData = dialogArguments; sData.sUserName = "Joan"; sData.fnUpdate(); } </SCRIPT> </HEAD> <BODY> <LABEL FOR="oEnterName" ACCESSKEY="f"> Enter your <SPAN STYLE="text-decoration:underline">F</SPAN>irst Name</LABEL> <OBJECT classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' height=0 id=wb name=wb width=0></OBJECT> <INPUT ID=oEnterName><BR><BR> <INPUT VALUE="Apply" TYPE=button onClick="fnGetInfo();"> <INPUT VALUE="Ok" TYPE=button onClick="fnGetInfo();window.close();"> <INPUT VALUE="Cancel" TYPE=button onClick="fnCancel();window.close();"> <input type='button' name='Submit2' value='-打印预览-' onclick='wb.execwb(7,1);' class='noprint'/> </BODY> </HTML>