1.Default.aspx页面 复制代码 代码如下: <BR>function GetUser(TxtEmpID,TxtEmpName,url) <BR>{ <BR>var properties = 'status:no;resizable:no;toolbar=no;menubar=no;location=no;scroll:no;dialogWidth:540px;dialogHeight:450px;' <BR>var arg=window.showModalDialog(url,"",properties); <BR>if(arg!=null) <BR>{ <BR>document.getElementById(TxtEmpID).value=arg[0]; <BR>document.getElementById(TxtEmpName).value=arg[1]; <BR>} <BR>} <BR> 2.Default.aspx.cs 复制代码 代码如下: protected void Page_Load(object sender, EventArgs e) { TextBox1.Attributes.Add("onclick", "GetUser('" + this.TextBox1.ClientID + "','" + this.TextBox2.ClientID + "','WebDialog.aspx)"); } 3.WebDialog.aspx 复制代码 代码如下: <BR>function Submit() <BR>{ <BR>var arr=new Array(); <BR>arr[0]= document.getElementById('TxtEmpID').value <BR>arr[1]= document.getElementById('TxtEmpCName').value <BR>arr[2]= document.getElementById('TxtTitleID').value <br><br>window.returnValue=arr; <BR>window.close(); <BR>} <br><br>