求解决js打开关闭框架不能兼容ff的问题
时间:2010-08-19 来源:设计源
<script language="JavaScript" type="text/JavaScript">
function preloadImg(src)
{
var img=new Image();
img.src=src
}
preloadImg("images/f_bar.gif");
var displayBar=true;
function switchBar(obj)
{
if (displayBar)
{
parent.frame.cols="0,7,*";
displayBar=false;
obj.src="images/e_bar.gif";
obj.alt="打开左边管理导航菜单";
}
else{
parent.frame.cols="160,7,*";
displayBar=true;
obj.src="images/f_bar.gif";
obj.alt="关闭左边管理导航菜单";
}
}
</script>
<table width="7" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right" onmouseover="this.style.backgroundColor='#C8F2FB'" onmouseout="this.style.backgroundColor='#ffffff'" style="cursor:pointer;background-color:#ffffff;"><a href="javascript:void(0);"><img src="images/f_bar.gif" width="6" style="cursor:pointer;" alt="关闭左边管理导航菜单" onClick="switchBar(this)"></a></td> </tr> </table>
在ie测试通过,可是不能兼容ff,不能触发鼠标事件,望高手指教,有能兼容ff和ie的源码,最好,谢谢
相关阅读 更多 +










