日期:2014-05-18  浏览次数:20640 次

JAVAscriptE框架网页访问对象,不是太懂老是出问题!
高手啊,那位帮我看下,我的做的框架网页,为什么老是不能自动加载那个百度的网页啊,是不是我写的访问对象不对啊,帮帮忙啊,如果是不对,我应该怎么访问它们的对象啊,





<!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>无标题文档</title>
</head>

<frameset rows="*" cols="188,*" framespacing="0" frameborder="no" border="0">
  <frameset rows="*,248" cols="*" framespacing="2" frameborder="yes" border="2">
<frame src="UntitledFrame-7.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="UntitledFrame-10.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
  </frameset>
  <frameset rows="*" cols="*,235" framespacing="2" frameborder="yes" border="2">
<frame src="Untitled-2.html" name="mainFrame" id="mainFrame" title="1" />
<frameset rows="227,*" cols="*" framespacing="2" frameborder="yes" border="2">
<frame src="UntitledFrame-9.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="UntitledFrame-8.html" name="rightFrame" scrolling="No" noresize="noresize" id="rightFrame" title="4" />
</frameset>
  </frameset>
</frameset>
<noframes>
<body>
<script language="javascript">
arent.top.frames(2).frames(1).location.href="http://www.baidu.com";
</script>
</body>
</noframes></html>


------解决方案--------------------
你那个都是在noframes的情况下才触发的代码哦。
现在基本上都支持框架页面,所以那段代码基本上不执行。