.aspx:
<script type="text/javascript"> function getReturnValue() { var strResult = window.showModalDialog('Depart.aspx?random=' + Math.random(), "", "dialogWidth=400px;dialogHeight=500px;status:no"); if (strResult != undefined) { var str = new Array(); str = strResult.split("|"); $("#hidId").val(str[0]); $("#hidName").val(str[1]); $("#txtDepart").val(str[1]); //alert(str[1]); } } </script> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> 请选择: </td> <td> <asp:TextBox ID="txtDepart" runat="server" CssClass="input required" onclick="getReturnValue();" size="30" ReadOnly="True"></asp:TextBox> <asp:HiddenField ID="hidId" runat="server" /> <asp:HiddenField ID="hidName" runat="server" /> </td> </tr> </table>