一个iframe嵌入了另一个页面的iframe编辑框,怎么取第二个iframe编辑框的内容?要支持Ff的

解决方案 »

  1.   

    iframe.contentWindow.document.body.innerHTML  。
      

  2.   

    var Iframe ;
     if(document.frames)
            {
                Iframe = document.frames('IframeName');
                Iframe.document.contentEditable='true';           
            }
            else
            {
                Iframe =document.getElementById('IframeID').contentWindow;
            }  Iframe.document.body.innerHTML
     Iframe.document.getElementById()
    ....
      

  3.   

    var iframe = document.getElementById('IframeID').contentWindow;
    var value = iframe.document.getElementById('文本框ID').value
      

  4.   

    获取对象,然后获取其元素document.getElementById('IframeID').contentWindow.document.getElementById('ID').value
      

  5.   

    这个编辑框是iframe的,也可以用value啊!
      

  6.   


    你那个编辑框 是放在iframe里面的吧?
    var value = iframe.document.getElementById('文本框ID').value
    这句不就是在拿文本框的id吗 然后拿vlaue
      

  7.   

    没有文本框啊!是iframe的编辑框,这个编辑框是套在另一个iframe里面的
      

  8.   


    test.html
    ------<HTML>
    <HEAD>
    <TITLE>Popup Example</TITLE><SCRIPT>function ButtonClick()
    {
    var oIframe = document.getElementById("iframe1");
    alert(oIframe.contentWindow.document.getElementById("inner_input").value);
    }
    </SCRIPT>
    </HEAD><BODY>
    outer:<input type=button onclick="ButtonClick();" value="click me">
    <iframe id="iframe1" src="inner.htm"></iframe></BODY>
    </HTML>inner.htm
    -------------
    inner:
    <input type=text id="inner_input" value="okay" >
      

  9.   

    我这个没有文本框的,是iframe编辑框
      

  10.   

    document.getElementById('IframeID').innerHTML
      

  11.   

    上面写错了,这个行不?
    document.getElementById('IframeID').contentWindow.document.getElementById('ID').innerHTML
      

  12.   

    实在不好意思,上面的好像都不行,这下可以了:
    document.getElementById( "iframe1 ").contentWindow.document.getElementById( "iframe2 ").contentWindow.document.body.innerText;