a.aspx:
<INPUT id="addnums" value="ilovethisgame" type="text">
<INPUT type="button" value="go" onclick="window.open('b.aspx','bb')">b.aspx:
<asp:TextBox id="TextBox1" style="Z-INDEX: 103; LEFT: 100px; POSITION: absolute; TOP: 152px" runat="server"></asp:TextBox>b.aspx.cs
private void Page_Load(object sender, System.EventArgs e)
{
this.TextBox1.Text = Response.Write("<script>window.opener.document.getElementById('addnums').innerText;</script>");//希望能接收到window.opener.document...的数据。
}
有一种方法,在b.aspx上添加一个INPUT,接收window.opener.document...然后runat=server以后服务端接收这个INPUT的值就能接收到window.opener.document...上的数据。但是这个方法受到INPUT的限制,也就是说如果我要同时传送n个数据就得有n个INPUT接收,这会增加页面负担,所以希望能从服务端直接或许window.opener.documeng...上的值,请高手指点迷津,谢谢