日期:2014-05-16  浏览次数:20349 次

怎样用JS动态改变frame框架里一个子frame的src 急!!
<!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,请各位高手帮帮忙!

------解决方案--------------------
top.right_bottomFrame.location.href = "xxxx.htm";
------解决方案--------------------
建议给 frame 增加 id="" ID属性,然后如下:

document.getElementById("对应的ID号").src="path/xxxx.htm"
------解决方案--------------------
探讨
top.right_bottomFrame.location.href = "xxxx.htm";

------解决方案--------------------
window.parent.document.getElementById("right_bottomFrame").src="xxx.htm";
------解决方案--------------------
探讨
我郁闷。。现在发现了个问题。。在这框架页面中调用不了JS。。。怎么在这个页面加载的时候调用这个页面的JS函数呢???