document.getElementById('bj').contentWindow.document.getElementById('id')

解决方案 »

  1.   

    document.getElementById('bj').contentWindow.document.getElementById('id')通过测试 ,,  可以...  或者  用 
    window.frames["bj"].document.getElementById('id')
    ^_^ !
      

  2.   

    当11.html onload执行Init函数时,12.html页面还没编译,所以访问不了页面的元素,我在这里想给12html页面中按钮绑定事件,该怎么办呢?
      

  3.   

    谢谢上面的回答,应该给生成的iframe添加一个onload事件 ifr.attachEvent("onload",ShowAbc);
    function ShowAbc(){}中就可以访问iframe 页面中的元素了