FireFox中javascript操作Frameset的问题
用js操作一个嵌套FrameSet,在IE中正常运行,但FireFox中没有反应。
frameset文件代码如下:
<html>
<head> <title> </title> </head>
<frameset rows= "54,* " frameborder= "NO " border= "0 " framespacing= "0 ">
<frame src= "header.html " name= "TopFrame " scrolling= "no " marginwidth= "0 " marginheight= "0 " noresize= "1 " scrolling= "no ">
<frameset cols= "18%,8,* " frameborder= "NO " framespacing= "0 " id= 'mainframeset ' name= "mainframeset ">
<frame name= "leftframe " src= "LeftMenu.jsp " scrolling= "auto " id= "leftframe ">
<frame name= "innerframe " src= "menutree/innerline.htm " scrolling= "no ">
<frame name= "mainframe " src= "content.html " scrolling= "auto ">
</frameset>
</frameset> <noframes> </noframes>
</html>
其中的innerframe里的文件内容如下:
innerline.htm:
<html>
<head>
</head>
<body topmargin= "0 " marginheight= "0 " leftmargin= "0 " marginwidth= "0 " width=100%>
<script language= 'javascript '>
function document.body.onselectstart(){
return false;
}
var premainframeset=window.parent.mainframeset.cols;
function showhidelist(){
if(top.mainframeset.cols== '0,8,* '){
top.mainframeset.cols=premainframeset;
top.innerframe.document.body.scrollLeft=0;
}else{
top.mainframeset.cols= '0,8,* ';
top.innerframe.document.body.scrollLeft=100;
}
}
</script>
<table width= "8 " height= "100% " border= "0 " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td background= 'innerimagebg.gif ' onclick= "showhidelist() " height= "100% " title= "Òþ²Ø/ÏÔʾÁбí " style= "CURSOR: hand "> <img src= "innerimage2.gif "> </td>
<td background= 'innerimagebg.gif ' onclick= "showhidelist() " height= "100% " title= "Òþ²Ø/ÏÔʾÁбí " style= "CURSOR: hand "> <img src= "innerimage1.gif "> </td>
</tr>
</table>
</body> </html>
问题就出在这个文件内的javascript代码上,问各位朋友指点。
------解决方案--------------------没用过FF,帮顶。
------解决方案--------------------应该是用了FireFox不支持的属性或事件,查一查吧
帮顶一下。。。