<script>
document.getElementById('lis').onmouseover = show;
document.getElementById('lis').onmouseout = hide;
function show(){
document.getElementById('ul1').style.display='block';
}
function hide(){
document.getElementById('ul1').style.display='none';
}
</script>
</head>
<body>
<ul>
<li class="lis"><a href="#" id="link">微博</a>
<ul id="ul1">
<li>死心</li>
<li>死心</li>
<li>死心</li>
</ul>
</li>
</ul>
</body>
<style>
li{ list-style:none; }
ul{ padding:0;margin:0;}
.lis{ position:relative; list-style:none; width:80px; height:30px; border:1px solid #000;}
.lis a{ text-decoration:none; display:block; line-height:30px; text-align:center;}
ul ul{ display:none; padding:0;margin:0; position:absolute; top:30px; left:-1px;border:1px solid #000; width:140px;}
ul ul li{ text-align:center;line-height:30px;}
</style>
<li class="lis">更改为<li id="lis">
style 要放头部 你这个js加 window.onload = functions 或者script 标签和 style标签换一下位置