<frameset rows="80,*" cols="*" frameborder="yes" border="1" framespacing="1">
  <frame src="about:top.php" name="topFrame" scrolling="NO" >
  <frameset rows="*" cols="156,*" framespacing="1" frameborder="yes" border="1">
    <frame src="about:<table border><td onclick=top.frames('mainFrame').location.href='about:hehe'>customer_menu.php</table>" name="leftFrame" scrolling="auto">
    <frame src="about:blank" name="mainFrame">
  </frameset>
</frameset>

解决方案 »

  1.   

    <frameset rows="80,*" cols="*" frameborder="yes" border="1" framespacing="1">
      <frame src="about:top.php" name="topFrame" scrolling="NO" >
      <frameset rows="*" cols="156,*" framespacing="1" frameborder="yes" border="1">
        <frame src="about:<table border><td onclick=top.mainFrame.location.href='about:hehe'>customer_menu.php</table>" name="leftFrame" scrolling="auto">
        <frame src="about:blank" name="mainFrame">
      </frameset>
    </frameset>
      

  2.   

    function getUrl(url){
    top.frames('mainFrame').location.href=url;
    }<tr valign="top" onclick="getUrl('customer_view.php?number=$number');">老大, !! 我这样写有错么!? 怎么还是不行啊? 应该是照您的方法做了哦!?它没提示别的就说俺这句 top.frames('mainFrame').location.href=url;
    有错, 错误提示"发生以外" ! 我晕. 怎么回事?
      

  3.   

    当然有错
    function getUrl(url){
    parent.frames('mainFrame').location.href=url;
    }
      

  4.   

    1.执行我的代码看看行不行2.看自己的代码中是否有name=top的控件这里top和parent没什么区别
      

  5.   

    1. 你的代码运行过了, 的确可以. 很正常.
    (但我用相同的代码只加了个function 就不行?)2. 经过几次核查. customer_menu.php 和 frame 页内都无name=top
    和 name= parent 的控件.
    -----------------------------------------------------------------
    <frameset rows="50,*" cols="*" frameborder="yes" border="1" framespacing="1">
      <frame src="top.php" name="topFrame" scrolling="NO" >
      <frameset rows="*" cols="156,*" framespacing="1" frameborder="yes" border="1">
        <frame src="customer_menu.php" name="leftFrame" scrolling="auto">
        <frame src="<? echo "customer_view.php?number=$number"; ?>" name="mainFrame">
      </frameset>
    </frameset>
    -----------------------------------------------------------------
      

  6.   

    呵呵~~ 问题已经解决. 真是晕..直接这样 parent.mainFrame.location=url; 就可以了.
    可我刚开始怎么试都不行. 再次感谢各位的帮助. 结帖. 给分!
      

  7.   


    parent是window的属性呀..
    这里默认的名字空间是window.
    所以将window.parent简写为parent