弹出对话框的页面A: 复制代码 代码如下: <BR> function openDialog(){<BR> paramers="dialogWidth:500px; dialogHeight:300px; status:no";<BR> workerId = window.showModalDialog("userList.aspx","",paramers);<BR> if(workerId!=undefined && workerId!=""){<BR> document.getElementById("leader").value = workerId;<BR> }<BR> }<BR> 模式对话框js: 复制代码 代码如下: <BR> function selectPositionAndClose(){ <BR> var obj = document.getElementById("userList"); <br><br> var user = ""; <BR> for(var i=0;i<obj.options.length;i++){ <br><br> if(obj.options[i].selected==true){ <BR> user = obj.options[i].value; <BR> } <BR> } <br><br> window.returnValue = user; <BR> window.close(); <BR> } <BR>