你的openMenu() 显示层;closeMenu()隐藏层
你的鼠标移到层上执行openMenu() ,离开层执行closeMenu()。
那你的鼠标来回移动的话,不闪就怪了。

解决方案 »

  1.   

    想要不闪,去掉onMouseOver和onMouseOut事件吧。
      

  2.   

    你的openMenu() 显示层;closeMenu()隐藏层
    你的鼠标移到层上执行openMenu() ,离开层执行closeMenu()。
    那你的鼠标来回移动的话,不闪就怪了。我的鼠标没有离开层啊,去掉onMouseOver和onMouseOut事件就实现不了我要的效果,有没有其他的解决方法?????
      

  3.   

    在子层上加onmouseover事件,让其显示!
      

  4.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script></head><body>
     <SCRIPT>
    function openMenu(){
    if (document.all) document.all.wei.style.visibility='visible';
    if (document.getElementById) document.getElementById("wei").style.visibility='visible';

    }function closeMenu(){
    if (document.all) document.all.wei.style.visibility='hidden';
    if (document.getElementById) document.getElementById("wei").style.visibility='hidden';
    }
    </SCRIPT>
    <table width="112" height="10" border="1" cellpadding="0" cellspacing="0">
      <tr> 
        <td height="10" onMouseenter='openMenu()' onMouseleave='closeMenu()'>
          <p> </p></td>
      </tr>
    </table>
    <div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 10px; top: 33px;"> 
            <div id="wei" onMouseenter='openMenu()' onMouseleave='closeMenu()'> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td>sdfd</td>
                  <td><a href="dfg">df</a></td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td>df</td>
                  <td>sdf</td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td><a href="sdfd">sdf</a></td>
                  <td>df</td>
                  <td>df</td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                </tr>
              </table>
            </div>
          </div>
    </body>
    </html>
      

  5.   

    把onmouseover和onmouseout替换为了,onmouseenter和onmouseleave并在div上也加了该属性。我处测试没有闪动。
      

  6.   

    试试?<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script></head><body>
     <SCRIPT>
    function openMenu(){
    if (document.all) document.all.wei.style.visibility='visible';
    if (document.getElementById) document.getElementById("wei").style.visibility='visible';

    }function closeMenu(){
    if (document.all) document.all.wei.style.visibility='hidden';
    if (document.getElementById) document.getElementById("wei").style.visibility='hidden';
    }
    </SCRIPT>
    <table width="112" height="10" border="1" cellpadding="0" cellspacing="0">
      <tr> 
        <td height="20"  onMouseOver='openMenu()' onMouseOut='closeMenu()'>
        </td></tr><tr><td>
    <div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 24px; top: 50px;"> 
            <div id="wei"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td>sdfd</td>
                  <td><a href="dfg">df</a></td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td>df</td>
                  <td>sdf</td>
                  <td> </td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td><a href="sdfd">sdf</a></td>
                  <td>df</td>
                  <td>df</td>
                  <td> </td>
                </tr>
                <tr> 
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                </tr>
              </table>
            </div>
          </div>
    </td>
      </tr>
    </table>
    </body>
    </html>