a.asp里面有个iframe  <iframe name="changenum" width="800" height="30" allowtransparency="1" src="b.asp" frameborder="0" scrolling="no"></iframe>b.asp 里有个 <form id="form1" name="form1" method="post" action="">
  <input name="num" type="text" id="num" />
</form>
现在就是b里的num值,变化时,让a里面同样表单的num值跟着变化
 
如何实现,谢谢大家

解决方案 »

  1.   

    <input name="num" type="text" id="num"
    onchange="opener.document.getElementById('num').value=this.value"; />
      

  2.   

    b.asp<input name="num" type="text" id="num"
    onchange="opener.document.getElementById('num').value=this.value;" />
      

  3.   

    <input name="num" type="text" id="num"
    onchange="parent.document.getElementById('num').value=this.value;" />
    应该用parent。。窗口打开的才用window.opener
      

  4.   

    这js写b.asp 里数值改变事件里面,num为a.asp 的输入框id,nums为b.asp 的输入框id
    parent.document.getElementById("num").value = document.getElementById('nums').value;
      

  5.   

    document.getElementById在google浏览器中用不了!:(
      

  6.   

    这个document.getElementById是w3c规定的方法。所以肯定都能用。楼主看看哪写错了吧