document.getElementById("ifrmae").getElementById("id");
必须要在里面的页面加载完了才行

解决方案 »

  1.   

    比如B所在的iframe name="ifr_b", B的 hidden 控件 id为 hidA里面这样
    frames.ifr_b.document.getElementById('hid').value
    如果 hid在form name="form_b"里 hidden控件 name="hid"
    可以不用写ID
    这样 frames.ifr_b.document.form_b.hid.value前提都是在调用上面方法前 B页面是已经 onload的
      

  2.   

    a.html
    <html>
    <head>
    </head>
    <script language="javascript">
    function test(){
    alert(document.getElementById("f1").contentWindow.document.getElementById("text1").value);
    }
    </script>
    <body>
    <h1>a.html</h1>
    <input type="button" value="test" onclick="test()">
    <br>
    <iframe id="f1" src="b.html"></iframe>
    </body>
    </html>b.html
    <html>
    <head>
    </head>
    <body>
    <h1>b.html</h1>
    <input type="hidden" id="text1" value="abcdefg"/>
    </body>
    </html>
      

  3.   

    $("#iframe id").contents().find("#iframe 中的 ID").val();  
    $("#iframe id").contents().find("#iframe 中的 ID").text(); 
    $("#iframe id").contents().find("#iframe 中的 ID").html();