Page.aspx:
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head runat=\"server\">
<title>无标题页</title>
<script type=\"text/javascript\" >...
function Pop()
...{
var result=showModalDialog(\'downs.aspx\',\'subpage\',\'dialogWidth:400px;dialogHeight:300px;center:yes;help:no;resizable:no;status:no\'); //打开模态子窗体,并获取返回值
document.getElementById(\"txt_id\").value=result.split(\"\'\")[0]; //返回值分别赋值给相关文本框
document.getElementById(\"txt_name\").value=result.split(\"\'\")[1];
document.getElementById(\"txt_pwd\").value=result.split(\"\'\")[2];
}
</script>
</head>
<body>
<form id=\"form1\" runat=\"server\">
<div>
<asp:TextBox ID=\"txt_id\" runat=\"server\" ></asp:TextBox>
<asp:TextBox ID=\"txt_name\" runat=\"server\" ></asp:TextBox>
<asp:TextBox ID=\"txt_pwd\" runat=\"server\" ></asp:TextBox>
<br />
<asp:Button ID=\"btnPop\" runat=\"server\" Text=\"PoPWindows\" />
</div>
</form>
</body>
</html>
本文地址:https://www.stayed.cn/item/20697
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我