日期:2014-05-16  浏览次数:20423 次

求大神指教,为什么在IE浏览器鼠标移到select标签就自动隐藏了啊???怎么解决啊,求解啊啊啊啊!!
<!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" />
<meta name="keywords" content="" />
<meta name="description" content=""/>

<title></title>
<script type="text/javascript" >
function ShowDiv(a,b){if(b==1)document.getElementById(a).style.display="block";else document.getElementById(a).style.display="none"}
</script>
<style type="text/css">
html,body{margin:0;padding:0;border:0;outline:0;vertical-align:baseline;background:transparent; font-weight:normal; font-style:normal; font:12px/100% 宋体;}
.dq_select_1{ margin-left:20px; width:93px; border:#CCCCCC solid 1px; height:19px; overflow:hidden;}
.dq_select_2{ margin-left:20px; width:93px; border:#CCCCCC solid 1px; margin-bottom:15px;}
.kc_city_cutover{position:relative;z-index:55;width:65px; line-height:20px; height:20px;}
.kc_city_tip{line-height:24px;background:#fff;position:absolute;left:0px;top:16px;padding:0px;width:370px;left:-165px;border:2px solid #069;}
.logo_m{ width:200px; height:500px; margin-left:300px;}
.kc_city_tip{ height:250px;}
</style>
</head>
<body>
<div id="logo">
<div class="logo_m">
<ul>
<li class="in_header_qidu_li">广州站</li>
<li class="kc_city_cutover" onmouseover="ShowDiv('diqu',1)" onmouseout="ShowDiv('diqu',0)">[切换城市]
<div class="kc_city_tip" id="diqu" style="display:none;">
<div class="kc_city_tip_biti">热门城市</div>
dsfsdsdddddddddddddddddddddddddddd

<div class="kc_city_tip_biti">选择你所在的地区</div>
<select class="dq_select_1">
<option>选择省</option>
<option>选择省</option>
<option>选择省</option>
</select>
<select class="dq_select_2">
<option>选择市</option>
<option>选择省</option>
<option>选择省</option>
</select>
<input type="submit" value="确定" class="header_submit" />
</div>
</li>
</ul>
</div>
</div>


</body>
</html>
select?option?IE浏览器?

------解决方案--------------------
function ShowDiv(a,b){
    if(b==1)
        document.getElementById(a).style.display="block";
    else {
        if(window.attachEvent){
            var ev = window.event;
            var to = ev.toElement;
            if(!to) return;
        }
        document.getElementById(a).style.display="none";
    }