高手啊,那位帮我看下,我的做的框架网页,为什么老是不能自动加载那个百度的网页啊,是不是我写的访问对象不对啊,帮帮忙啊,如果是不对,我应该怎么访问它们的对象啊,<!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>
<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>
现在基本上都支持框架页面,所以那段代码基本上不执行。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<input type="button" name="Submit" value="按钮" onclick="showurl();" />
<script language="javascript">
function showurl(){
top.frames[4].location.href="http://www.baidu.com";
}
</script>
</body>
</html>
想了,半天,终于想明白,是怎么回事了,,,,上面这是一个框架,调用另一个框架,在对方的框架中打开网址,的代码,,,书上,真是不能全信啊,日,了,原来,是书上错了,误导了,我,,,害我,苦想了,几天,真 是晕,死,,