<html>
<SCRIPT> 
//不被框架遮住的下拉菜单 
var oPopup = window.createPopup(); function showMenu(obj,x,left,top,right,height)  
{    
var oPopBody = oPopup.document.body; 
var HTML = document.all("menu" + x).innerHTML;          
oPopBody.innerHTML = HTML; 
var rows = HTML.match(/<TR>/g).length; 
oPopup.show(obj.offsetLeft + left, obj.offsetTop + top, right, rows * 18 +height, document.body); 
} function hidMeau(){
oPopup.hide();

}
</SCRIPT>   <span style="display:none" id="menu1">  
  <TABLE WIDTH="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#779BD2" style='cursor:hand' > 
  <TR> <TD bgcolor="#FFFFFF" style='font-size:9pt;' > <table width="100%" border="0" cellspacing="1" cellpadding="2"> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';"  style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='music.htm';">音乐试听 </td> 
    </tr> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='movie.htm';">影视大片 </td> 
    </tr> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;' >其他 </td> 
    </tr> 
  </table> </TD> 
  </TR> 
  </TABLE> 
  </span> 
  <span style="display:none" id="menu2">  
  <TABLE WIDTH="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#779BD2" style='cursor:hand' > 
  <TR> <TD bgcolor="#FFFFFF" style='font-size:9pt;' > <table width="100%" border="0" cellspacing="1" cellpadding="2"> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';"  style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='music.htm';">游戏天地 </td> 
    </tr> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='movie.htm';">外挂下载 </td> 
    </tr> 
    <tr bgcolor="#4088FE"> 
      <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;' >其他 </td> 
    </tr> 
  </table> </TD> 
  </TR> 
  </TABLE> 
  </span> <table width="630" height="24" border="0" cellpadding="0" cellspacing="0" class="topTablePlace" > 
      <tr> 
        <td align="center"> <a href="#"  onclick="top.frames['mainFrame'].location.href='#';">首页 </a> </td> 
        <td align="center" onMouseOver="showMenu(this,1,70,46,100,72);" onmouseout="hidMeau()"> <a href="#">music管理 </a> </td> 
        <td align="center" onMouseOver="showMenu(this,2,90,46,100,114); " onmouseout="hidMeau()"> <a href="#">game管理 </a> </td> 
        <td align="center"> <a href="#"> <font color="#FF0000">注销 </font> </a> </td> 
      </tr> 
    </table> 
</html>

解决方案 »

  1.   

    你上面给出的代码是从“music管理”上移出后菜单就消失了,而鼠标移动到下拉菜单上再从下拉菜单移出时菜单还没消失。
    现在我要的菜单是鼠标移到“music管理”上显示下拉菜单,当鼠标移动到下拉菜单范围内菜单依然显示,当移出下拉菜单时下拉菜单隐藏。
      

  2.   

    <html>
    <SCRIPT> 
    //不被框架遮住的下拉菜单 
    var oPopup = window.createPopup(); 
    var st;
    function showMenu(obj,x,left,top,right,height)  
    {    
    var oPopBody = oPopup.document.body; 
    var HTML = document.all("menu" + x).innerHTML;          
    oPopBody.innerHTML = HTML; 
    var rows = HTML.match(/<TR>/g).length; 
    oPopup.show(obj.offsetLeft + left, obj.offsetTop + top, right, rows * 18 +height, document.body); 
    } function hidMeau(){
        st=setTimeout(function(){oPopup.hide();},100);    
    }
    oPopup.document.onmouseover=function()
    {
     if(st)clearTimeout(st); 
    }
    oPopup.document.onmouseout=function()
    {
      st=setTimeout(function(){oPopup.hide();},10);    
    }
    </SCRIPT>   <span style="display:none" id="menu1">  
      <TABLE WIDTH="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#779BD2" style='cursor:hand' > 
      <TR> <TD bgcolor="#FFFFFF" style='font-size:9pt;' > <table width="100%" border="0" cellspacing="1" cellpadding="2"> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';"  style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='music.htm';">音乐试听 </td> 
        </tr> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='movie.htm';">影视大片 </td> 
        </tr> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;' >其他 </td> 
        </tr> 
      </table> </TD> 
      </TR> 
      </TABLE> 
      </span> 
      <span style="display:none" id="menu2">  
      <TABLE WIDTH="100" border="0" cellpadding="1" cellspacing="1" bgcolor="#779BD2" style='cursor:hand' > 
      <TR> <TD bgcolor="#FFFFFF" style='font-size:9pt;' > <table width="100%" border="0" cellspacing="1" cellpadding="2"> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';"  style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='music.htm';">游戏天地 </td> 
        </tr> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;'  onclick="top.frames['mainFrame'].location.href='movie.htm';">外挂下载 </td> 
        </tr> 
        <tr bgcolor="#4088FE"> 
          <td height="20" align="left" bgcolor="#D0DCFF" onMouseOver="javascript:this.bgColor='#92B7FE';" onMouseOut="javascript:this.bgColor='#D0DCFF';" style='font-size:9pt;' >其他 </td> 
        </tr> 
      </table> </TD> 
      </TR> 
      </TABLE> 
      </span> <table width="630" height="24" border="0" cellpadding="0" cellspacing="0" class="topTablePlace" > 
          <tr> 
            <td align="center"> <a href="#"  onclick="top.frames['mainFrame'].location.href='#';">首页 </a> </td> 
            <td align="center" onMouseOver="showMenu(this,1,70,46,100,72);" onmouseout="hidMeau()"> <a href="#">music管理 </a> </td> 
            <td align="center" onMouseOver="showMenu(this,2,90,46,100,114); " onmouseout="hidMeau()"> <a href="#">game管理 </a> </td> 
            <td align="center"> <a href="#"> <font color="#FF0000">注销 </font> </a> </td> 
          </tr> 
        </table> 
        </html>