[html][javascript]父子窗体传值
父窗体
<script type="text/javascript"> newwindow = window.open("b1.html","_blank"); function test(){ var mytext = document.getElementById("myinfo"); newwindow.document.getElementById("myinfo").innerText = mytext.value; } </script>
子窗体
<script type="text/javascript"> function test(){ opener.document.getElementById('myinfo').value="123"; } </script>
仅在 IE 下有效,谷歌浏览器下无效果,父子窗体互相传值。