在页面上的doExit写成doExit(event)
function doExit(e){
e =   e||event
var elm=e.relatedTarget||e.toElement;
eExit=event.toElement;
if (eMenu==null || eExit==null) return;
if (!eMenu.contains(eExit) && !eItem.contains(eExit)) noMenu();
}function doOver(){
if ("A"==event.srcElement.tagName.toUpperCase()) {
eItem=event.srcElement.parentElement;
eDesk=eItem.parentElement;
eMenu=document.all[eItem.id.replace('item','menu')];
if (eMenu && eMenu!=null) {eMenu.onmouseout=doExit;doMenu();}
else noMenu();}
}
写成  
function doOver(e){           //页面上doOver(event)
e = event|| e
var obj = e.srcElement||e.target
if ("A"==obj.tagName.toUpperCase()) {
eItem=obj.parentElement;
eDesk=eItem.parentElement;
eMenu=document.all[eItem.id.replace('item','menu')];
if (eMenu && eMenu!=null) {eMenu.onmouseout=doExit;doMenu();}
else noMenu();}
}
无完整例子无法调试

解决方案 »

  1.   

    没有例子无法调试。LS改的是正确的,不过肯定还是不能在FF上运行的。补充一点
    倒数第三行使用document.all在FF中是不支持的,LZ看下最好是使用别有方式来获取控件
      

  2.   

    ie的event.srcElement在ff下是e.target
    css的属性值可能需要指定单位
    document.all最好用document.getElementById/getElementsByTagName/getElementsByName等标准的方法来代替parentElement看起来比较陌生,通常是写parentNode/childNodes的..
      

  3.   

    本人菜鸟一只,希望各位大哥、大姐多多帮忙,小妹在此谢过了!!关于html 页面代码我整理了一下,大家请看:<!-- -------------------------------------------------------------------------------------- -->
      <DIV class=menu id=menu11 >
       <A href="page/AboutUs/CompanyInfo.html" >Company Info</A><BR>
       ...                
       ...
      </DIV>
      <DIV class=menu id=menu12 >
       <A href="page/ITConsultingForE-business.html" >IT Consulting For E-business</A>
       ...
       ...
              </DIV>
      <DIV class=menu id=menu14>
       <A href="page/Industries/Overview.html">Overview</A><BR>
       ...
                    ...
      </DIV>
      <DIV class=menu id=menu16 style="border:1px solid #e0dede; margin-left:20px;" align="left" >
       <A href="page/Success story/success stories.html" >IT Consulting For E-business</A><BR>
       ...
      </DIV>
      
     <DIV class=desk id=desk1 onmouseover=doOver() onmouseout=doExit()>
    <SPAN id=item11>
    <A href="http://www.experexchange.com" onclick="return false;">About Us</A>︱
    </SPAN>
    <SPAN id=item12>
    <A href="http://www.experexchange.com" onclick="return false;">Service</A>︱
    </SPAN>
    <SPAN id=item14>
    <A href="http://www.experexchange.com" onclick="return false;">Industries</A>︱
    </SPAN>
    <SPAN id=item15>
    <A href="page/WhyExperExchange/WhyExperExchange.html">Why ExperExchange</A>︱
    </SPAN>
    <SPAN id=item16>
    <A href="http://www.experexchange.com" onclick="return false;">Success Stories</A>

    </DIV>
    <!-- -------------------------------------------------------------------------------------- -->
      

  4.   

    抱歉 menu.js 里有段代码没粘,本来以为没用的。function doHome(i){
    switch (i) {
    case 1 : window.external.AddFavorite('http://www.experexchange.com',document.title);break;
    case 2 : window.external.AddChannel('http://www.experexchange.com');break;
    default : event.srcElement.style.behavior='url(#default#homepage)';event.srcElement.setHomePage('http://www.experexchange.com');break;}
    return false;    
    }function doSel(){
    var o=event.srcElement;
    if ('select'!=o.tagName.toLowerCase()) return;
    var s=o.options[o.selectedIndex].value;
    o.selectedIndex=0;
    if (s!='1') self.location=s;
    }function doWin(l,a,b){
    w=window.open(l,'dhtmlet','toolbar=0');
    var winx=Math.ceil((window.screen.width-a)/2);
    var winy=Math.ceil((window.screen.height-b)/2);
    w.resizeTo(a,b);
    w.moveTo(winx,winy);
    w.focus();想了想还是把整个文件贴出来吧,方便大家调试。这个在ie里面是没问题的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ExperExchange: Software Solution Provider | Why ExperExchange </title>
    <script type="text/javascript" src="menu.js"></script>
    </head><body text="#000000" link="#0000FF" vlink="#800080" ><!--topmargin="0" leftmargin="0"-->
    <style type="text/css">
    ul{list-style-image:none}
    </style>
    <center><!-- -------------------------------------------------------------------------------------- -->
      <DIV class=menu id=menu11 style="border:1px solid #e0dede;" align="left">
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/aboutus/companyinfo.html" style="font-size:9px;"><b><font color="3b53a0">Company Info</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/aboutus/managementteam.html" style="font-size:9px;"><b><font color="3b53a0">Management Team</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/aboutus/methodology.html" style="font-size:9px;"><b><font color="3b53a0">Methodology</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/aboutus/careers.html" style="font-size:9px;"><b><font color="3b53a0">Gareers</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/aboutus/news.html" style="font-size:9px;"><b><font color="3b53a0">News</font></b></A><BR>
      </DIV>
      <DIV class=menu id=menu12 style="border:1px solid #e0dede; margin-left:20px;" align="left">
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/itconsultingfore-business.html" style="font-size:9px;"><b><font color="3b53a0">IT Consulting For E-business</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/offshoredevelopmentcenter.html" style="font-size:9px;"><b><font color="3b53a0">Offshore Development Center</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/itserviceforstartupcompany.html" style="font-size:9px;"><b><font color="3b53a0">IT Service For Startup Company</font></b></A><BR>
      </DIV>
      <DIV class=menu id=menu14  style="border:1px solid #e0dede; margin-left:20px;" align="left">
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/overview.html" style="font-size:9px;"><b><font color="3b53a0">Overview</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/financialservice&banking.html" style="font-size:9px;"><font color="3b53a0"><b>Financial Service & Banking</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/manufacturing.html" style="font-size:9px;"><b><font color="3b53a0">Manufacturing</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/government.html" style="font-size:9px;"><b><font color="3b53a0">Government</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/retail&distributiont.html" style="font-size:9px;"><b><font color="3b53a0">Retail & Distribution</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/education.html" style="font-size:9px;"><font color="3b53a0"><b>Education</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/telecommunications.html" style="font-size:9px;"><b><font color="3b53a0">Telecommunications</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/industries/professionalservice.html" style="font-size:9px;"><b><font color="3b53a0">Professional Service</font></b></A><BR>
      </DIV>
      <DIV class=menu id=menu16 style="border:1px solid #e0dede; margin-left:20px;" align="left" >
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/success%20story/success%20stories.html" style="font-size:9px;"><b><font color="3b53a0">IT Consulting For E-business</font></b></A><BR>
       <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/success%20story/success%20stories.html" style="font-size:9px;"><b><font color="3b53a0">Offshore Development Center</font></b></A><BR>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/success%20story/success%20stories.html" style="font-size:9px;"><b><font color="3b53a0">IT Service For Startup Company</font></b></A><BR>
      </DIV>
      
     <DIV class=desk id=desk1 onmouseover=doOver() onmouseout=doExit() align="center" noWrap bgcolor="#ffffff" >
    <SPAN id=item11>
    <A href="http://www.experexchange.com" onclick="return false;" style="padding-right:20px; font-weight:bold;">About Us</A>︱
    </SPAN>
    <SPAN id=item12>
    <A href="http://www.experexchange.com" onclick="return false;" style="padding-right:20px;padding-left:20px; font-weight:bold;">Service</A>︱
    </SPAN>
    <SPAN id=item14>
    <A href="http://www.experexchange.com" onclick="return false;" style="padding-right:20px;padding-left:20px; font-weight:bold;">Industries</A>︱
    </SPAN>
    <SPAN id=item15>
    <A href="file:///d|/dailydocument/20090423/experexchange/experexchange/page/whyexperexchange/whyexperexchange.html" style="padding-right:20px;padding-left:20px; font-weight:bold;">Why ExperExchange</A>︱
    </SPAN>
    <SPAN id=item16>
    <A href="http://www.experexchange.com" onclick="return false;" style="padding-right:20px;padding-left:20px; font-weight:bold;">Success Stories</A>
    </SPAN>
    <SPAN id=item>
    <img src="file:///D|/DailyDocument/20090423/ExperExchange/ExperExchange/image/Experexchange/index/white.jpg" />
    </SPAN>
    </DIV>
    <!-- -------------------------------------------------------------------------------------- -->

    </center>
    </body>
    </html>