| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1111 人关注过本帖
标题:ie和firefox中的js区别
取消只看楼主 加入收藏
porsche
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-6-24
收藏
 问题点数:0 回复次数:0 
ie和firefox中的js区别
小弟现有一段js代码,在ie中可以正常使用,但是到ff中就不能,望指教!
代码如下:
<script type="text/JavaScript">
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
imgmenu = eval("imgmenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
imgmenu.background="images/bg_nav1.gif";
imgmenu.className='whi12B';
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
imgmenu.background="images/bg_nav.gif";
imgmenu.className='blu12B';
}
}
</script>

<table width="200" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30"></td>
          </tr>
          <tr>
            <td height="34" valign="bottom" background="images/bg_nav.gif" id="imgmenu0" style="cursor:hand" onClick="showsubmenu(0)" class="blu12B" onmouseover="showbg(0)" onmouseout="hidbg(0)"><div style="margin-left:34px; margin-bottom:13px">aaaaaaa</div></td>
          </tr>
          <tr>
            <td id="submenu0" style="DISPLAY: none"><table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="34" height="21" align="right" background="../images/bg_nav.gif"><img src="../images/btm_tubiao7.gif" width="2" height="3" hspace="5" /></td>
                  <td width="166" align="left" valign="middle" background="../images/bg_nav.gif"><a href="11.htm" class="blk10" id="subitem1">11</a></td>
                </tr>
                <tr>
                  <td height="1" colspan="2" align="left" valign="top" background="../images/img_line1.gif"></td>
                </tr>
                <tr>
                  <td height="21" align="right" background="../images/bg_nav.gif"><img src="../images/btm_tubiao7.gif" width="2" height="3" hspace="5" /></td>
                  <td align="left" valign="middle" background="../images/bg_nav.gif"><a href="22.htm" class="blk10" id="subitem2">22</a></td>
                </tr>
                <tr>
                  <td height="1" colspan="2" align="left" valign="top" background="../images/img_line1.gif"></td>
                </tr>
            </table></td>
          </tr>
        </table>
搜索更多相关主题的帖子: firefox 
2008-06-24 11:41
快速回复:ie和firefox中的js区别
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022827 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved