源码 html:
<frameset cols="208,*" rows="*" > 
  <frameset id="LeftFrame" rows="220,160,*" cols="*"> 
    <frame id="LeftupFrame"  name="LeftupFrame" src="frmleftup.htm" target="RightFrame" marginwidth="0" marginheight="0" scrolling="no" frameborder="2" BORDERCOLOR="white">
    <frame id="LeftmidFrame"  name="LeftmidFrame" src="frmleftmid.htm" target="RightFrame" marginwidth="0" marginheight="0" scrolling="no" frameborder="2" BORDERCOLOR="white">
    <frame id="LeftdownFrame" name="LeftdownFrame" src="frmleftdown.htm" marginwidth="10" marginheight="10" scrolling="Auto" frameborder="2" BORDERCOLOR="white">
  </frameset>
  <frame id="RightFrame" name="RightFrame" src="frm000.htm" marginwidth="0" marginheight="0" scrolling="no" frameborder="2" BORDERCOLOR="white" BGCOLOR="#000000">
</frameset>
<noframes></noframes>通过frmleftdown.htm中获取rightframe
 最好有源码 javascript的。

解决方案 »

  1.   

    试试top.getElementById("RightFrame")
      

  2.   

    top.getElementById("RightFrame").MediaPlayer.Controls.pause();
      

  3.   

    top.RightFrame.document.getElementById("")再不行的话,LZ把RightFrame这个页面的代码贴出来
      

  4.   

    行: 17
    错误: 'top.RightFrame.document' 为空或不是对象
    frmleftup.htm
    :
    <html>
    <head>
    <title>Video</title>
    <script language="javascript" src="frmleftdown.js"></script>
    </head>
    <script language="javascript">
    var  mpStopped=1, mpPaused=2, mpPlaying=3,
    mpScanForward=4, mpScanReverse=5, mpEnded=8,
            NeverUpdatePosition=1,TimerID = 0,
            AsxFileName;
    </script>  <script language="javascript" for="MediaPlayer" EVENT="playStateChange(NewState)">
       switch(NewState)
    {
      case mpPlaying:
       top.RightFrame.document.getElementById("MediaPlayer").Controls.play();
    parent.LeftmidFrame.MediaPlayer.Controls.play();
    break;
      case mpPaused:
       top.RightFrame.document.getElementById("MediaPlayer").Controls.pause();
    parent.LeftmidFrame.MediaPlayer.Controls.pause();
    break;
      case mpStopped:
       top.RightFrame.document.getElementById("MediaPlayer").Controls.stop();
    parent.LeftmidFrame.MediaPlayer.Controls.stop();
    break;
      case mpEnded:
       parent.close();
       break;
    }
      </script>  <script language="javascript" FOR="MediaPlayer" EVENT="PositionChange(dblOldPosition, dblNewPosition)">
       parent.RightFrame.MediaPlayer.Controls.CurrentPosition = dblNewPosition;
    parent.LeftmidFrame.MediaPlayer.Controls.currentPosition = dblNewPosition;
      </script><body bgcolor="black">
    <object align=right classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 id=MediaPlayer width="100%" height="100%" type=application/x-oleobject standby="Loading Microsoft? Windows? Media Player components...">
        <param NAME="AutoStart" VALUE="-1">
        <param NAME="Balance" VALUE="0">
        <param name="enabled" value="-1">
        <param NAME="EnableContextMenu" VALUE="0">
        <param NAME="url" VALUE="000.asf">
        <param NAME="PlayCount" VALUE="1">
        <param name="rate" value="1">
        <param name="currentPosition" value="0">
        <param name="currentMarker" value="0">
        <param name="defaultFrame" value="">
        <param name="invokeURLs" value="0">
        <param name="baseURL" value="">
        <param name="stretchToFit" value="1">
        <param name="volume" value="50">
        <param name="mute" value="0">
        <param name="uiMode" value="full">
        <param name="windowlessVideo" value="-1">
        <param name="fullScreen" value="0">
        <param name="enableErrorDialogs" value="-1">
        <param name="SAMIStyle" value>
        <param name="SAMILang" value>
        <param name="SAMIFilename" value>
    </object>
    </body>frm000.htm:<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>PowerCreator VGAPlayer</title>
    <style>
    A:link { text-decoration:none;  }
    A:visited { text-decoration: none;  }
    A:active { text-decoration:none;  }
    A:hover { text-decoration:none; font-weight: bold; color: rgb(255,255,0) }
    </style>
    </head><body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" bgcolor="0x0">
      <object id="MediaPlayer" height="100%" width="100%" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="MediaPlayer" align="middle">
        <param NAME="AutoStart" VALUE="-1">
        <param NAME="Balance" VALUE="0">
        <param name="enabled" value="-1">
        <param NAME="EnableContextMenu" VALUE="0">
        <param NAME="url" VALUE="Screen.avi">
        <param NAME="PlayCount" VALUE="1">
        <param name="rate" value="1">
        <param name="currentPosition" value="0">
        <param name="currentMarker" value="0">
        <param name="defaultFrame" value="">
        <param name="invokeURLs" value="0">
        <param name="baseURL" value="">
        <param name="stretchToFit" value="1">
        <param name="volume" value="50">
        <param name="mute" value="0">
        <param name="uiMode" value="none">
        <param name="windowlessVideo" value="0">
        <param name="fullScreen" value="0">
        <param name="enableErrorDialogs" value="-1">
        <param name="SAMIStyle" value>
        <param name="SAMILang" value>
        <param name="SAMIFilename" value>
    </object>
    </body>
    </html>
      

  5.   

    lihui_shine  怎么不来了
      

  6.   

    alert(top.RightFrame);
    alert(top.RightFrame.name);
    看看什么结果PS:我这边的一个结构类似的框架,用top.frame名.document是可以的,IE/FF都可以