大家好,我现在做个后台框架,用到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中,这个怎么实现啊,谢谢!

解决方案 »

  1.   

    top.html 中有"业务中心","系统管理"   你这里是导航么?如果cnter.html跳转到业务中心,可以写个JS脚本,$().ready(function(){///跳转代码 })
      

  2.   

    body.onload之后document.frame[1].document找业务中心那个NODE的href,赋值到document.frame[2].location.href上。
      

  3.   

    你把这个页面 center.html 默认为业务中心的内容就好了
      

  4.   


    frame[1].document
    frame[2].location.href上。没有document。
      

  5.   

    [User:root Time:01:10:18 Path:/home/apache/web]$ cat main.php 
    <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>一个例子,你可以试试。