下拉菜單不出來,還有這種報錯
<!DOCTYPE?html>
<html>
<head>
????<meta?charset="UTF-8">
????<title>Document</title>
????<style?type="text/css">
????????body{
????????????behavior:url(csshover.htc);
????????}
????????
????????/**{margin:?0;padding:?0;}*/
????????.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-color:?#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(img/slide.png)?0?0?repeat-x;}
????????.note{color:?#3f240e;display:?block;background:?url(img/slide.png)?0?0?repeat-x;}
????????.corner{display:?block;height:?11px;background:?url(img/bird.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){
????????????????????????SubH(u.id);
????????????????????}
????????????????}
????????????};
????????}
????????function?AddH?(id)?{
????????????//?body...
????????????var?ulList?=?document.getElementById(id);
????????????var?h=?ulList.offsetHeight;
????????????h+=1;
????????????if?(h<=42)?{
????????????????ulList.style.height?=?h+"px";
????????????????setTimeout("AddH('"+id+"')",10);
????????????}?else{
????????????????return;
????????????};
????????????
????????}
????????function?SubH(){
????????}
????</script>
</head>
<body>
????<ul?id="nav">
????????<li><a?href=""><span>首頁</span></a></li>
????????<li><a?href="">學習中心</a>
????????????<ul?id="menuUL">
????????????????<span></span>
????????????????<li><a?href="">前端課程</a></li>
????????????????<li><a?href="">手機開發</a></li>
????????????????<li><a?href="">后臺編程</a></li>
????????????</ul>
????????</li>
????????<li><a?href="">經典案例</a></li>
????????<li><a?href="">關于我們</a></li>
????</ul>
</body>
</html>
下拉菜單不出來,還有這種報錯
2015-03-13
有這種判斷嗎?我的理解范圍內是這樣的
還有你的css 樣式與你的html都沒有關系,當然沒有效果了~~~~
2015-10-17
u!=undefined