1、这是控制左侧菜单显示与隐藏代码<HTML><HEAD><TITLE>控制左菜单显隐</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<script type="text/javascript">var LEFT_MENU_VIEW=0;/*function leftmenu_open()
{
leftmenu_ctrl();
}*/function leftmenu_ctrl()
{
debugger;
if(LEFT_MENU_VIEW==0)
{
window.parent.adminframe.cols="180,9,*";
LEFT_MENU_VIEW=1;
myarrow.src="../images/arrow_l.gif";
}
else
{
window.parent.adminframe.cols="0,9,*";
LEFT_MENU_VIEW=0;
myarrow.src="../images/arrow_r.gif";
}
}function setPointer(theRow, thePointerColor)
{
if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined')
{
return false;
} var row_cells_cnt=theRow.cells.length;
for (var c = 0; c < row_cells_cnt; c++)
{
theRow.cells[c].bgColor = thePointerColor;
} return true;
}</SCRIPT>
<!--
<META content="MSHTML 6.00.2600.0" name=GENERATOR> --></HEAD>
<BODY leftMargin="0" onload="leftmenu_ctrl()" topMargin="0" style="BACKGROUND-COLOR: #f1f1f1">
<TABLE width="13" height="100%" align="center" cellPadding="0" cellSpacing="0" bgcolor="#CCCCCC">
<TBODY>
<TR>
<TD width="11">
<TABLE
width="10" height=40 border=1 cellPadding=0 cellSpacing=0 borderColorLight="#000000" borderColorDark="#ffffff" bgColor="#eeeeee">
<TBODY>
<TR onMouseOver="setPointer(this, '#D3E5FF')" onclick="leftmenu_ctrl()"
onmouseout="setPointer(this, '#EEEEEE')">
<TD id="buttonIcon" width="8" style="CURSOR: hand"><IMG
src="../images/arrow_l.gif" width="7" height="7" id="myarrow"/></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>2、这是主页面框架代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XXX</title>
</head><frameset rows="130,*" cols="*" id="topFrame" border="1" frameSpacing="1" frameBorder="1" bordercolor="#AE00AE">
<frame src="menu/Top.jsp" name=head frameBorder="0" scrolling=no noResize id="head" border="1" marginWidth="0"/>
<frameset cols="180,9,*" frameborder="1" border="1" id="adminframe" framespacing="1">
<frame src="menu/LeftMenu.jsp" name="leftFrame" scrolling=no noResize />
<frame src="menu/bar.html" name="barFrame" scrolling=no frameborder="1"/>
<frame src="menu/Welcome.jsp" border="1" frameBorder="1" name="mainFrame" id="mainFrame" noResize/>
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
这些代码在IE中能够正常执行,但在Firefox中不能实现左侧菜单显示与隐藏功能,通过跟踪发现问题在于第1处代码中的leftmenu_ctrl()函数中,请高手指点,谢谢!
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<script type="text/javascript">var LEFT_MENU_VIEW=0;/*function leftmenu_open()
{
leftmenu_ctrl();
}*/function leftmenu_ctrl()
{
debugger;
if(LEFT_MENU_VIEW==0)
{
window.parent.adminframe.cols="180,9,*";
LEFT_MENU_VIEW=1;
myarrow.src="../images/arrow_l.gif";
}
else
{
window.parent.adminframe.cols="0,9,*";
LEFT_MENU_VIEW=0;
myarrow.src="../images/arrow_r.gif";
}
}function setPointer(theRow, thePointerColor)
{
if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined')
{
return false;
} var row_cells_cnt=theRow.cells.length;
for (var c = 0; c < row_cells_cnt; c++)
{
theRow.cells[c].bgColor = thePointerColor;
} return true;
}</SCRIPT>
<!--
<META content="MSHTML 6.00.2600.0" name=GENERATOR> --></HEAD>
<BODY leftMargin="0" onload="leftmenu_ctrl()" topMargin="0" style="BACKGROUND-COLOR: #f1f1f1">
<TABLE width="13" height="100%" align="center" cellPadding="0" cellSpacing="0" bgcolor="#CCCCCC">
<TBODY>
<TR>
<TD width="11">
<TABLE
width="10" height=40 border=1 cellPadding=0 cellSpacing=0 borderColorLight="#000000" borderColorDark="#ffffff" bgColor="#eeeeee">
<TBODY>
<TR onMouseOver="setPointer(this, '#D3E5FF')" onclick="leftmenu_ctrl()"
onmouseout="setPointer(this, '#EEEEEE')">
<TD id="buttonIcon" width="8" style="CURSOR: hand"><IMG
src="../images/arrow_l.gif" width="7" height="7" id="myarrow"/></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>2、这是主页面框架代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XXX</title>
</head><frameset rows="130,*" cols="*" id="topFrame" border="1" frameSpacing="1" frameBorder="1" bordercolor="#AE00AE">
<frame src="menu/Top.jsp" name=head frameBorder="0" scrolling=no noResize id="head" border="1" marginWidth="0"/>
<frameset cols="180,9,*" frameborder="1" border="1" id="adminframe" framespacing="1">
<frame src="menu/LeftMenu.jsp" name="leftFrame" scrolling=no noResize />
<frame src="menu/bar.html" name="barFrame" scrolling=no frameborder="1"/>
<frame src="menu/Welcome.jsp" border="1" frameBorder="1" name="mainFrame" id="mainFrame" noResize/>
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
这些代码在IE中能够正常执行,但在Firefox中不能实现左侧菜单显示与隐藏功能,通过跟踪发现问题在于第1处代码中的leftmenu_ctrl()函数中,请高手指点,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货