<strong>首先是父页面的代码:</strong> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="20312" class="copybut" id="copybut20312" onclick="doCopy('code20312')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code20312"> <br> <br><title>无标题页</title> <br> <br>function openDia() { <br>var returned = window.showModalDialog("Default4.aspx?" + (new Date()), window); <br>if (returned) { <br>document.getElementById("ret").innerHTML = returned; <br>} <br>else { <br>document.getElementById("ret").innerHTML = ""; <br>} <br>} <br> --%> <br><script type="text/javascript"> <BR>function openDia(){ <BR>var returned = window.showModalDialog("Default3.aspx?" + (new Date()), window); <BR>if (returned){ <BR>document.getElementById("tbtext").value = returned; <BR>} <BR>else{ <BR>document.getElementById("tbtext").value = ""; <BR>} <BR>} <BR></script> <br> <br> <br><form id="form1" runat="server"> <br><div id="ret"> <br><input id="tbtext" type="text" value="" onclick="openDia();return false;"> <br> </div> <br><button id="Button1" runat="server" text="Button" onclientclick="openDia();return false;"></button> <br><input id="Hidden1" type="hidden" runat="server"> <br> </form> <br> <br> </div>