我在某个地方下载的代码,但是在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=gb2312" />
<title>可点击展开与收缩的左侧纵向二级导航菜单-零度对策</title>
<meta name="keywords" content="JS代码,js导航条,JS横向菜单代码,JS特效代码" />
<meta name="description" content="此代码内容为可点击展开与收缩的左侧纵向二级导航菜单" />
<link href="base.css" rel="stylesheet" type="text/css" />
<style type="text/css" >
span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, img, ins, kbd, q, samp, strike, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td{font-size:100%;margin:0;outline:0 none;padding:0;border:0 none;}
body,input,select {font-family:\5B8B\4F53,Arial Narrow,arial,serif;background:#FFFFFF; color:#000; font-size: 12px; line-height: 20px; text-align: left;}
table{border-collapse:collapse;}
ul,li{ list-style: none;}
/*clear*/
.cb,.cb_10,.cb_15{clear: both; width: 100%; height: 0; overflow: hidden;}
.cl{ clear: left}
.cr{ clear: right}
.cb_10{ height:10px;}
.cb_15{ height:15px;}
/*float*/
.fl{ float: left; display:inline;}
.pt_10{padding-top:10px}a{color:#03c;text-decoration:none;}
a:hover{color:#f60;text-decoration:none;}.tjskl-main{ width:950px; margin:0 auto;}
.tjskl-sidebar{ width:183px;}.tj_submain .title{background:url("inco_bg.gif");}.tj_submain{border:1px solid #c8d2e5; border-bottom: 0; z-index:10; position:relative; width:181px; font-weight: normal;}
#submain_hidden{ border-top:0; display: none;}
.bsb{ border-bottom:1px solid #c8d2e5;border-top:0; }#more_submenu a.show{ background: url('subh_bg.gif') no-repeat 100% 2px; text-align: right; display: block; width: 125px; padding-right: 19px; }
#more_submenu a.less{ background: url('subh_bg.gif') no-repeat 100% -25px; text-align: right; display: block; width: 125px; padding-right: 19px; }
.tj_submain .title{ background-repeat: repeat-x; background-position:0 -217px; height:24px; line-height:24px;font-size: 12px;font-weight: bold;width:161px; padding-left:20px;}
.tj_submain li { width:181px; list-style: none; border-bottom:1px solid #E7F3FF; line-height:100%; }
.tj_submain li a{width:141px; display:inline-block; line-height:18px; padding:4px 20px;line-height:21px;}
.tj_submain li a.on{background:url('bg_01.gif') no-repeat scroll 0 100%; border-top:1px solid #FFC83D;width:161px;padding:3px 0 3px 20px; position: relative; z-index:90;}
.tj_submain span{top:0; left:180px; z-index: 1; background-color:#FFFAE2; border: #FFC83D solid 1px; display: none;}
.tj_submain span a{ display: block; line-height: 18px; padding-left: 20px;}
.tj_submain span a:hover{background:#FFFAE2; background:#ebf0f5;text-decoration:none;}.tj_submain ul li{ float:left; margin-right:10px;}
.tj_submain ul li span a{text-decoration:none;}
.tj_submain ul li span a:hover{ color:#f60; }
</style> <script language="javascript">
function do_list_row_show(strid){
strid.getElementsByTagName('a')[0].className='on';
strid.getElementsByTagName('span')[0].style.display="block";
strid.style.position="relative";
}
function do_list_row_unshow(strid){
strid.getElementsByTagName('a')[0].className='';
strid.getElementsByTagName('span')[0].style.display="";
strid.style.position="";
}
var mouse_flash={};
mouse_flash.switch_tab = function(a,event,name,count){
var itemId = name+'_show_wrap'+a;
var tabId = name+'_tab'+a;
for(var i=1; i<=count; i++){
if(a==i){
document.getElementById(itemId).style.display='block';
document.getElementById(tabId).className='cur';
}else{
document.getElementById(name+'_show_wrap'+i).style.display='';
document.getElementById(name+'_tab'+i).className='';
}
}
} mouse_flash.submenu = function(box,div){
var div_classname = document.getElementById(div).getElementsByTagName('a')[0];
if(div_classname.className=='show'){
with(document.getElementById(box).style){
height='auto';display='block';
}
div_classname.className='less';div_classname.innerHTML='收缩';
}else{
with(document.getElementById(box).style){
height='0';display='none';
}
div_classname.className='show';div_classname.innerHTML='展开';
} } var num_arr = [0,1,2,3];
mouse_flash.focus_tab = function(num,event,name){
if(num<0){
num_arr.unshift(num_arr.pop());
}else{
num_arr.push(num_arr.shift());
}
for(var i=0; i<num_arr.length;i++){
if(num_arr[0]== i){
document.getElementById(name+i).style.display='block';
}else{
document.getElementById(name+i).style.display='';
}
}
}
var num_arr2 = [0,1];
mouse_flash.focus_tab2 = function(num,event,name){
if(num<0){
num_arr2.unshift(num_arr2.pop());
}else{
num_arr2.push(num_arr2.shift());
}
for(var i=0; i<num_arr2.length;i++){
if(num_arr2[0]== i){
document.getElementById(name+i).style.display='block';
}else{
document.getElementById(name+i).style.display='';
}
}
}
</script>
</head>
<body><div class="tjskl-main pt_10">
<div class="tjskl-sidebar fl">
<ul class="tj_submain" style="border-bottom:0;">
<li class="title">商品目录</li>
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="http://www.duice.net">精品锁具</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li>
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="#">卫生间隔断</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li>
</ul>
<ul id="submain_hidden" class="tj_submain" >
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="#">精品地弹簧</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li> </ul>
<ul class="tj_submain bsb">
<li id="more_submenu"><a style="cursor:pointer;" onClick="mouse_flash.submenu('submain_hidden','more_submenu'); return false;" class="show">展开</a></li>
</ul>
</div>
<div class="cb"></div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>可点击展开与收缩的左侧纵向二级导航菜单-零度对策</title>
<meta name="keywords" content="JS代码,js导航条,JS横向菜单代码,JS特效代码" />
<meta name="description" content="此代码内容为可点击展开与收缩的左侧纵向二级导航菜单" />
<link href="base.css" rel="stylesheet" type="text/css" />
<style type="text/css" >
span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, img, ins, kbd, q, samp, strike, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td{font-size:100%;margin:0;outline:0 none;padding:0;border:0 none;}
body,input,select {font-family:\5B8B\4F53,Arial Narrow,arial,serif;background:#FFFFFF; color:#000; font-size: 12px; line-height: 20px; text-align: left;}
table{border-collapse:collapse;}
ul,li{ list-style: none;}
/*clear*/
.cb,.cb_10,.cb_15{clear: both; width: 100%; height: 0; overflow: hidden;}
.cl{ clear: left}
.cr{ clear: right}
.cb_10{ height:10px;}
.cb_15{ height:15px;}
/*float*/
.fl{ float: left; display:inline;}
.pt_10{padding-top:10px}a{color:#03c;text-decoration:none;}
a:hover{color:#f60;text-decoration:none;}.tjskl-main{ width:950px; margin:0 auto;}
.tjskl-sidebar{ width:183px;}.tj_submain .title{background:url("inco_bg.gif");}.tj_submain{border:1px solid #c8d2e5; border-bottom: 0; z-index:10; position:relative; width:181px; font-weight: normal;}
#submain_hidden{ border-top:0; display: none;}
.bsb{ border-bottom:1px solid #c8d2e5;border-top:0; }#more_submenu a.show{ background: url('subh_bg.gif') no-repeat 100% 2px; text-align: right; display: block; width: 125px; padding-right: 19px; }
#more_submenu a.less{ background: url('subh_bg.gif') no-repeat 100% -25px; text-align: right; display: block; width: 125px; padding-right: 19px; }
.tj_submain .title{ background-repeat: repeat-x; background-position:0 -217px; height:24px; line-height:24px;font-size: 12px;font-weight: bold;width:161px; padding-left:20px;}
.tj_submain li { width:181px; list-style: none; border-bottom:1px solid #E7F3FF; line-height:100%; }
.tj_submain li a{width:141px; display:inline-block; line-height:18px; padding:4px 20px;line-height:21px;}
.tj_submain li a.on{background:url('bg_01.gif') no-repeat scroll 0 100%; border-top:1px solid #FFC83D;width:161px;padding:3px 0 3px 20px; position: relative; z-index:90;}
.tj_submain span{top:0; left:180px; z-index: 1; background-color:#FFFAE2; border: #FFC83D solid 1px; display: none;}
.tj_submain span a{ display: block; line-height: 18px; padding-left: 20px;}
.tj_submain span a:hover{background:#FFFAE2; background:#ebf0f5;text-decoration:none;}.tj_submain ul li{ float:left; margin-right:10px;}
.tj_submain ul li span a{text-decoration:none;}
.tj_submain ul li span a:hover{ color:#f60; }
</style> <script language="javascript">
function do_list_row_show(strid){
strid.getElementsByTagName('a')[0].className='on';
strid.getElementsByTagName('span')[0].style.display="block";
strid.style.position="relative";
}
function do_list_row_unshow(strid){
strid.getElementsByTagName('a')[0].className='';
strid.getElementsByTagName('span')[0].style.display="";
strid.style.position="";
}
var mouse_flash={};
mouse_flash.switch_tab = function(a,event,name,count){
var itemId = name+'_show_wrap'+a;
var tabId = name+'_tab'+a;
for(var i=1; i<=count; i++){
if(a==i){
document.getElementById(itemId).style.display='block';
document.getElementById(tabId).className='cur';
}else{
document.getElementById(name+'_show_wrap'+i).style.display='';
document.getElementById(name+'_tab'+i).className='';
}
}
} mouse_flash.submenu = function(box,div){
var div_classname = document.getElementById(div).getElementsByTagName('a')[0];
if(div_classname.className=='show'){
with(document.getElementById(box).style){
height='auto';display='block';
}
div_classname.className='less';div_classname.innerHTML='收缩';
}else{
with(document.getElementById(box).style){
height='0';display='none';
}
div_classname.className='show';div_classname.innerHTML='展开';
} } var num_arr = [0,1,2,3];
mouse_flash.focus_tab = function(num,event,name){
if(num<0){
num_arr.unshift(num_arr.pop());
}else{
num_arr.push(num_arr.shift());
}
for(var i=0; i<num_arr.length;i++){
if(num_arr[0]== i){
document.getElementById(name+i).style.display='block';
}else{
document.getElementById(name+i).style.display='';
}
}
}
var num_arr2 = [0,1];
mouse_flash.focus_tab2 = function(num,event,name){
if(num<0){
num_arr2.unshift(num_arr2.pop());
}else{
num_arr2.push(num_arr2.shift());
}
for(var i=0; i<num_arr2.length;i++){
if(num_arr2[0]== i){
document.getElementById(name+i).style.display='block';
}else{
document.getElementById(name+i).style.display='';
}
}
}
</script>
</head>
<body><div class="tjskl-main pt_10">
<div class="tjskl-sidebar fl">
<ul class="tj_submain" style="border-bottom:0;">
<li class="title">商品目录</li>
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="http://www.duice.net">精品锁具</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li>
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="#">卫生间隔断</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li>
</ul>
<ul id="submain_hidden" class="tj_submain" >
<li id="#" onMouseOut="do_list_row_unshow(this);" onMouseOver="do_list_row_show(this);">
<a title="" href="#">精品地弹簧</a>
<span>
<a title="" href="#">锌合金制</a>
<a title="" href="#">铝合金制</a>
<a title="" href="#">不锈钢制</a>
<a title="" href="#">铜 制</a>
</span>
</li> </ul>
<ul class="tj_submain bsb">
<li id="more_submenu"><a style="cursor:pointer;" onClick="mouse_flash.submenu('submain_hidden','more_submenu'); return false;" class="show">展开</a></li>
</ul>
</div>
<div class="cb"></div>
</div>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货