为什么最后我点击名称然后名称和编号的框跑到搜索框上面去了
<!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" />
<title>无标题文档</title>
<style>
body{font:12px/1.5 Tahoma, Geneva, sans-serif;}
a{text-decoration:none;}
.search_text{float:left;}
.search_button{float:left;}
.search_button input{font-size:14px;font-family:"微软雅黑";background-color:#ff8c00;color:#fff;border:0;width:100px;height:45px;cursor:pointer/*鼠标光标设置*/}
.search_text{height:39px;background-color:#ff8c00;overflow:hidden;padding:3px 0 3px 77px;}
.search_text input{height:37px;line-height:39px;width:320px;border:none;outline:0;background:#fff;}
ul{list-style:none;display:block;}
ul,li{margin:0;padding:0;}
.search_list{position:absolute;top:11px;left:11px;width:72px;height:39px;overflow:hidden;background:#fff;border-left:1px solid #f6f6f6;border-right:1px solid #e5e5e5;;}
.search_list li{display:block;height:39px;line-height:39px;overflow:hidden;text-align:center;}
.search_list li a{color:#666;}
.selected{background-color:#f6f6f6;}
.trigger_hover{height:auto;}
</style>
</head>
<body>
<div class="search_container">
<div id="search_tab" class="search_list">
<ul>
<li id="tab_1" class="selected">
<a href="#">名 称 </a>
</li>
<li id="tab_2">
<a href="#">编 号 </a>
</li>
</ul>
</div>
<div class="search_pannel">
<form>
<div class="search_text">
<input type="text" >
</div>
<div class="search_button">
<input type="submit" value="搜 索" />
</div>
</form>
</div>
</div>
</body>
<script>
var getDOM=function(id){
return document.getElementById(id);
}
var addEvent=function(id,event,fn){
var el=getDOM(id)||document;
if(el.addEventListener){
el.addEventListener(event,fn,false);
}else if(el.attachEvent){
el.attachEvent('on'+event,fn);
}
}
addEvent('search_tab','mouseover',function(){
this.className+='trigger_hover';
});
addEvent('tab_1','mouseover',function(){
if(this.className.indexOf('selected')<0){
this.className+='selected';
}
});
addEvent('tab_1','mouseout',function(){
this.className='';
});
addEvent('tab_1','click',function(){
getDOM('search_tab').className='search_list';
});
addEvent('tab_2','mouseover',function(){
if(this.className.indexOf('selected')<0){
this.className+='selected';
}
});
addEvent('tab_2','mouseout',function(){
this.className='';
});
addEvent('tab_2','click',function(){
getDOM('search_tab').className='search_list';
});
</script>
</html>