日期:2014-05-18  浏览次数:20616 次

iframe 如何获得 parent 中 文本框的值,并刷新 父窗体
就是在一个页面中包含一个   iframe,在   iframe   中有一个按纽,这个按纽的作用是想得到父窗体的两个文本框的值,如何写呢?   谢谢!!!

------解决方案--------------------
parent.document.getElementById( "XXX ").value
------解决方案--------------------
在页面中用一个 <input type= "hidden " name= "hid ">

js:

hid.value = "JS的值 "
------解决方案--------------------
parent.document.getElementById( "XXX ").value

parent.document.getElementByNames( "XXX ").value