下面代码是dreamweaver8生成的:index.html-->开头部分略
<frameset rows="*,269" cols="*" framespacing="0" frameborder="no" border="0">
  <frame src="file:///C|/Documents and Settings/pgd/My Documents/win32fan/index_top.html" name="mainFrame" id="mainFrame" title="mainFrame" />
  <frameset rows="*" cols="*,216" framespacing="0" frameborder="no" border="0">
<frame src="file:///C|/Documents and Settings/pgd/My Documents/win32fan/index_left.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
<frame src="file:///C|/Documents and Settings/pgd/My Documents/win32fan/index_right.html" name="rightFrame" scrolling="No" noresize="noresize" id="rightFrame" title="rightFrame" />
  </frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
index_top.html中有几个按钮,我想在按钮响应事件中,动态改变bottomFrame的src,就是想给它加载新的内容。但试了以下代码,运行时均抛出空对象异常:
window.frames["bottomFrame"].src="introduction.html";

document.getElementById("bottomFrame").src="introduction.html";

window.parent.document.getElementById("bottomFrame").src="introduction.html";(上面几行代码都在index_top.html中)小弟初学做网页,请大家教教我应该怎么办,谢谢!