<IFRAME ID="IFrame1" name="IFrame1" marginwidth="0" marginheight="0"  FRAMEBORDER="1" SCROLLING="yes" SRC="main.html"  > </IFRAME> 
<input type="button" value="获得" onclick="read()">
<script language="JavaScript">
<!--
function read(){
alert(IFrame1.frames['comright'].document.getElementById("otext").value)//document.getElementById("otext").value是右框架里的控件
}
//-->
</script>

解决方案 »

  1.   

    obj=document.getElementById("IFrame1")
    objj=obj.document.getElementById("comright")
      

  2.   

    window.frames["comright"].document.getElementById("***")
      

  3.   

    obj=document.getElementById("IFrame1") 
    objj=obj.document.getElementById("comright")
    objj.document.getElementById("otext").value
      

  4.   

    try:var val = document.getElementById('IFrame1').contentWindow.document.getElementById('comright').contentWindow.document.getElementById('某个INPUT的ID').value
      

  5.   


    <IFRAME ID="IFrame1" name="IFrame1" marginwidth="0" marginheight="0"  FRAMEBORDER="1" SCROLLING="yes" SRC="main1.asp"  > </IFRAME> 
    <input type="button" value="获得" onclick="read()">
    <script language="JavaScript">
    <!--
        function read(){
    obj=document.getElementById("IFrame1") 
    objj=obj.document.getElementById("comright") 
            alert(objj.document.getElementById("otext").value)
        }
    //-->
    </script>
      

  6.   

    document.frames["IFrame1"].document.frames["comright"].document.getElementById("***");你可以试下,先取到最外面的框架对象,然后再获取嵌入的框架对象,由于涉及到跨页面,每获取一个对象后需要加上document对象,呵呵,我从子级能去到父级的,希望你也可以咯。呵呵!
      

  7.   

    <IFRAME ID="IFrame1" name="IFrame1" marginwidth="0" marginheight="0"  FRAMEBORDER="1" SCROLLING="yes" SRC="main1.asp"  > </IFRAME> 
    <input type="button" value="获得" onclick="read()">
    <script language="JavaScript">
    <!--
        function read(){
    var objj=document.getElementById("IFrame1").contentWindow.frames['comright'];
            alert(objj.document.getElementById("otext").value)
        }
    //-->
    </script>
      

  8.   

    <IFRAME ID="IFrame1" name="IFrame1" marginwidth="0" marginheight="0"  FRAMEBORDER="1" SCROLLING="yes" SRC="main1.asp"  > </IFRAME> 
    <input type="button" value="获得" onclick="read()">
    <script language="JavaScript">
    <!--
        function read(){
    var obj=document.getElementById("IFrame1").contentWindow 
    var objj=obj.document.getElementById("comright").contentWindow 
            alert(objj.document.getElementById("otext").value)
        }
    //-->
    </script>
      

  9.   

    IFrame1.frames['comright'].document.getElementById("otext").value