老师我的代码为什么不会弹出效果啊 好不容易改的没有错误了
老师我的代码为什么不会弹出效果啊 好不容易改的没有错误了
咯在这里两天 了
000000000 郁闷死我了 00000000000000000000000000000000000000000000000000
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.top-nav
{
font-size: 14px;
font-weight: bold;
list-style: none;
}
.top-nav li
{
float: left;
margin-right: 1px;
}
.top-nav li a
{
line-height: 34px;
text-decoration: none;
background: #3f240e;
color: #fff;
display: block;
width: 80px;
text-align: center;
}
.top-nav ul
{
list-style: none;
display: none;
padding: 0;
position: absolute;
height: 0;
overflow: hidden;
}
.top-nav li a:hover
{
background: url(slide-bg.png) 0 0 repeat-x;
}
.note
{
color: #3f240e;
display: block;
background: url(slide-bg.png) 0 0 repeat-x;
}
.corner
{
display: block;
height: 11px;
background: url(corner-bg.png) 31px 0 no-repeat;
}
</style>
<script type = "text/javascript">
window.onload = function(){
var Lis = document.getElementsByTagName("li");
for (var i = 0; i < Lis.length; i++) {
Lis[i].onmouseover = function()
{
var u = this.getElementsByTagName("ul")[0];
if (u != undefined) {
u.style.display = "block";
AddH(u.id);
};
}
Lis[i].onmouseleave = function()
{
var u = this.getElementsByTagName("ul")[0];
if (u != undefined) {
u.style.display = "block";
SubH(u.id);
};
}
}
function AddH(id){
var ulList = document.getElementById("id");
if (ulList != undefined) {
var h = ulList.offsetHeight;
h += 1;
if (h < 52) {
ulList.style.height = h + "px";
setTimeout("AddH('"+ id +"')", 10);
}
else{
return;
}
}
}
function SubH(id){
var ulList = document.getElementById("id");
if ( ulList != undefined ){
var h = ulList.offsetHeight;
h -= 1;
if (h > 0) {
ulList.style.height = h + "px";
alert(h);
setTimeout("SubH('"+ id +"')", 10);
}
else{
return;
};
}
}
}
</script>
</head>
<body>
<ul>
<li><a href="#"><span>慕课网</span></a></li>
<li><a href="#">课程大厅</a></li>
<li>
<a href="#">学习中心</a>
<ul id="menuL">
<span class="corner"></span>
<li><a href="#">前端课程</a></li>
<li><a href="#">手机开发</a></li>
<li><a href="#">后台开发</a></li>
</ul>
</li>
<li><a href="#">关于我们</a></li>
</ul>
</body>
</html>00000000000000000000000000000000000发完代码发现这个编辑器会吞代码000000000我就截个图0000000000000000000000


