本帖最后由 lxf3483 于 2011-06-27 19:19:09 编辑

解决方案 »

  1.   

    A.html
    <input type='button' value='openFrame' onclick='openFrame()'/>
    <iframe ID='subpage' src=''></iframe>
    <script type="text/javascript">
    function openFrame(){
      var ifm= document.getElementById("subpage")
      ifm.src='B.html'
      function isload()
      {
        if(ifm.contentWindow.document.readyState == "complete")
        {
           ifm.contentWindow.document.getElementById("subtext").value="11111111111"
           window.clearInterval(i);
        }
      }
       var i = window.setInterval(isload,10)
    }
    </script>
      

  2.   

    在A页面中用
    document.getElementById('subpage').contentWindow.document.getElementById('subtext')
    这里用一个contentWindow就可以。当时于B.html里的window
    --------------------------------------帅签分割线-------------------------------------------------
      

  3.   

    document.getElementById('subpage').contentWindow.document.getElementById('subtext')
    主要是这句,contentWindow这个属性。
      

  4.   

    感谢 aspwebchh ,我所要的就是这个答案,在页面读取完成后再给页面赋值。