<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>123</title>
</head><frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frameset cols="45%,*" frameborder="no" border="0" framespacing="0">
    <frame src="left.html" name="leftFrame" scrolling="AUTO" noresize="noresize" id="leftFrame" title="leftFrame" />
<frameset rows="10%,*" cols="*" frameborder="1" border="1" framespacing="0">
     <frame src="right_top.html" name="right_topFrame" id="right_topFrame" title="right_topFrame" />
<frame src="" name="right_bottomFrame" id="right_bottomFrame" title="right_bottomFrame" />
</frameset>
  </frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
我应该怎么用JS实现动态改变right_bottomFrame的src?
功能描述:在right_topFrame中创建一个下拉列表,选择不同的值,就在right_bottomFrame显示不同的网页,这些都是纯html,请各位高手帮帮忙!

解决方案 »

  1.   

    top.right_bottomFrame.location.href = "xxxx.htm";
      

  2.   

    建议给 frame 增加 id="" ID属性,然后如下:document.getElementById("对应的ID号").src="path/xxxx.htm"
      

  3.   

    如果外面没有嵌套页,这样可以;
    如果还有嵌套页:
    parent.right_bottomFrame.location.href = "xxxx.htm";
      

  4.   

    window.parent.document.getElementById("right_bottomFrame").src="xxx.htm";
      

  5.   

    这些都是写在该框架页面的<script></script>里面吗?
    我现在改了,准备在另外一个页面的下拉列表传值转到这个框架页面来,要动态改变链接地址。也就是下拉列表选择的项不同,right_bottomframe显示的网页就不同
    请各位再帮忙看看!
      

  6.   

    我郁闷。。现在发现了个问题。。在这框架页面中调用不了JS怎么在这个页面加载的时候调用这个页面的JS函数呢???
      

  7.   


    frameset 标签支持onload事件body 标签支持onload事件
      

  8.   

    关注
    我在页面里混搭了javascript和VBscript,使用这个功能的时候经常混乱