window.opener.document.all.haha.value = document.all.haha.value;

解决方案 »

  1.   

    我是说
    window.opener.document.all.haha.value太长写起来嘛烦
    我想这样写
    hehe.haha.value
    让hehe如何代表window.opener.document.all?
      

  2.   

    可以,这么做
    var hehe = window.opener.document.all;
    alert(hehe.haha.value);
      

  3.   

    所有对象都可以赋值给一个自己定义的变量
    <span id=show>3</span>
    <script>
    var n1 = show.innerHTML;
    alert(n1)
    var b=show.innerText;
    alert(b);
    var hehe = document.all("show");
    alert(hehe.innerText);
    </script>
      

  4.   


    var hehe = window.opener.document.all;
    alert(hehe.haha.value);