日期:2014-05-17  浏览次数:20604 次

js菜单下拉,怎么有一个可以正常显示,另一个点击一闪就没啦~~
js菜单下拉,怎么有一个可以正常显示,另一个点击一闪就没啦~~
单独的菜单是可以的,放入页面中就不正常了,是怎么回事呀,高手帮忙~~
蛋糕目录中是正常的,在关于我们里就弹一下就没了显示,是啥原因呀
HTML code
<!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=gb2312" />
<title>Chinaz菜单导航</title>
<style type="text/css">
<!--
div, ul, p{
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-style: normal;
    font-size: 100%;
    font-family: inherit;
}


/* Nav
==========================================================*/
.nav {
width:990px;
    position: relative;
 margin:0px auto;
}
.navinner { background-color:#000000;
}
.navlist {
    height: 45px;
    line-height: 36px;
    overflow: hidden;
    
    
}
.nav li {
    float: left;
    display: inline;
    margin: 0 0 0 -2px;

}
.nav a {
    display: block;
    width: 200px;
    text-align: center;
    font-size: 120%;
}
.nav a:link, .nav a:visited {
    color: #fff;
}
.nav a.current, .nav a:hover, .nav a:active {
    color: #fff;
    font-weight: bold;

}
.subnav {
    position: absolute;
    top: 41px;
    left: 0;
    float: left;
    height: 30px; width:990px;
    line-height: 28px;
    white-space: nowrap;
    background-color:#1b0908;
}
* html .subnav {
    margin: 0 10px 0 -10px; /* IE 6 and below */
}
.subnav p {
    padding: 0 10px;

}
.subnav p span {
    display: block;

}
.subnav p.pointer {
    position: absolute;
    top: 5px;
    left: 0;
    height: 5px;
    width: 11px;
    padding: 0;
    margin-left: 20px;
    text-indent: -999em;
    
}
.subnav a {
    display: inline;
    padding: 0;
    font-size: 100%;
}
[class~="subnav"] a {
  
}
.subnav, .subnav a:link, .subnav a:visited {
    color: #235e99;
}
.subnav a:hover, .subnav a:active {
    color: #235e99;
}
.subnav a:hover, .subnav a:active {
    font-weight: normal;
    background: none;
    
}
/* subnav position and pointer position */
#subnav1 { left: auto; right: 0px; }
#subnav2 { left: auto; right: 0px; }
#subnav3 { left: auto; right: 0px; }
#subnav4 {left: auto;  right: 0px;}
#subnav5, #subnav6, #subnav7 { 
    left: auto;
    right: 0px;
}
#subnav1 .pointer,
#subnav2 .pointer,
#subnav3 .pointer,
#subnav4 .pointer { left: auto; }
#subnav5 .pointer { left: auto; right: 290px; }
#subnav6 .pointer { left: auto; right: 180px; }
#subnav7 .pointer { left: auto; right: 70px; }
#subnav1, #subnav2, #subnav3, #subnav4 {
    min-width: 110px;
}
#subnav5 { min-width: 340px; }
#subnav6 { min-width: 240px; }
#subnav7 { min-width: 130px; }
/* Note
==========================================================*/
.note {
    margin: 0 15px 10px;
 color:#666666;
}
.note span{
 float:right;
}
.disable {
    display: none;
}
-->
</style>
<script type="text/javascript">
<!--
function $(id) {
    return document.getElementById(id);
}
function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);
    if (showMenu.timer) clearTimeout(showMenu.timer);
 hideCur();
    divID.style.display = 'block';
 showMenu.cur = divID;
    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
   hideCur();
            divID.style.display = 'block';
        };
        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }
        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
 function hideCur () {
  showMenu.cur && (showMenu.cur.style.display = 'none');
 }
}

function MM_swapImgRestore() { //v3.0