大家好,我现在做个后台框架,用到frameset,设计如下
<frameset rows="98,*,8" frameborder="no" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frame src="center.html" name="mainFrame" id="mainFrame" />
<frame src="down.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" />
</frameset>top.html 中有"业务中心","系统管理" 业务模块,我想在系统登录进去后默认跳转到"业务中心"并展现在中部的center.html中,这个怎么实现啊,谢谢!
<frameset rows="98,*,8" frameborder="no" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frame src="center.html" name="mainFrame" id="mainFrame" />
<frame src="down.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" />
</frameset>top.html 中有"业务中心","系统管理" 业务模块,我想在系统登录进去后默认跳转到"业务中心"并展现在中部的center.html中,这个怎么实现啊,谢谢!
frame[1].document
frame[2].location.href上。没有document。
<html>
<script type="text/javascript">
window.onload = function() {
var a = window.frames[0].document.getElementsByTagName("a")[0];
window.frames[1].location.href = a.href;
}
</script>
<frameset cols="25%,50%,25%">
<frame src="a.html" />
<frame src="b.html" />
<frame src="c.html" />
</frameset>
</html>
[User:root Time:01:10:20 Path:/home/apache/web]$ cat a.html
<html>
<body>
<a name="url" href="a.html">click</a>
</body>
</html>一个例子,你可以试试。