<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>
<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>
<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>
top.frames('mainFrame').location.href=url;
}<tr valign="top" onclick="getUrl('customer_view.php?number=$number');">老大, !! 我这样写有错么!? 怎么还是不行啊? 应该是照您的方法做了哦!?它没提示别的就说俺这句 top.frames('mainFrame').location.href=url;
有错, 错误提示"发生以外" ! 我晕. 怎么回事?
function getUrl(url){
parent.frames('mainFrame').location.href=url;
}
(但我用相同的代码只加了个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>
-----------------------------------------------------------------
可我刚开始怎么试都不行. 再次感谢各位的帮助. 结帖. 给分!
parent是window的属性呀..
这里默认的名字空间是window.
所以将window.parent简写为parent