两个页面的文本框传值

解决的问题:在A页面点击一个按钮打开B页面。B页面里为商家信息,点击商家信息确认后,再把商家信息传回到A页面的文本框中。

A页面代码:

< input id = " a "  type = " text "  runat = " server "  readonly = " readOnly "   />
< input id = " aa "  type = " button "  value = " 选择商家 "   onclick = " window.open('B.aspx') "  title = " 选择商家 " />

B页面代码:

< input id = " b "  runat = " server "  type = " text "   />
< input id = " bb "  type = " button "  value = " 确定商家 "  onclick = " opener.document.all.a.value=b.value;window.close() " />

 

你可能感兴趣的