|
<base target="_self"> </base>
<script language="javascript">
function openwin(){ a=window.showModalDialog('Default2.aspx?param=ReturnValue');//打开模态对话框,变量a接收返回值 document.form1.TextBox1.value=a[1];//将返回值绑定到TextBox1控件 document.form1.TextBox2.value=a[0];//将返回值绑定到TextBox1控件
//document.forms[0].submit();//刷新页面 } </script>
protected void Page_Load(object sender, EventArgs e) { this.Button1.Attributes["onclick"] = "openwin()";
}
<script language="javascript"> function ReturnValue(PamA,PamB) { var my_array = new Array(PamA,PamB); window.returnValue = my_array; window.close(); }
</script>
if (!IsPostBack) { string ValueA = "ValueA"; string ValueB = "ValueB"; this.Button1.Attributes["onclick"] = "ReturnValue('" + ValueA + "','" + ValueB + "')"; }
|
一共有 1 条评论