如何将弹出窗口的数据回传到父窗口中,谢谢!

我现在在做一个程序,现在遇到一个问题,其中的一个页面有两个框架页面,单击一个按钮,弹出一个页面,现在我要想将弹出窗口中的数据回传到父窗口中的框架页面 中,请高手指点该如何实现。最好能有源代码。谢谢!
---------------------------------------------------------------

opener.parent.frames['frameName'].document.all.input1.value="fason"
---------------------------------------------------------------

opener.parent.frames['frameName'].document.all.input1.value="fason"

 1是你要操作的框架名称   
 2opener.parent.frames['frameName'].document.formName.input1.value="fason"也可以   
 3  
 4\---------------------------------------------------------------   
 5  
 6Titemdanga=eval((Titemgum-total)/Titemcount);错了,你用eval不要乱用   
 7Titemgum = Number(opener.parent.itemlist.document.ordersheet1.itemgum0.value);   
 8Titemcount =Number(opener.parent.itemlist.document.ordersheet1.itemcount0.value);   
 9Titemdanga=(Titemgum-total)/Titemcount;   
10  
11  
12\---------------------------------------------------------------   
13  
14他的规范写法   
15其实可以简单的写为   
16  
171 父窗口框架页面显示
18```
19<input id="iAmSon"/>
20```
21子窗口: opener.iAmSon.value = "SoEasy";   
22  
23/////////////////   
242 父窗口本体页面显示
25```
26<input id="iAmSon"/>
27```
28子窗口: opener.parent.iAmSon.value = "SoEasy";
Published At
Categories with Web编程
Tagged with
comments powered by Disqus