<html>
<head>
<title>哦哦</title>
<style type="text/css">
a{ color:#c00; text-decoration:none;}
a:hover{ color:#00f;}
ul{ list-style:none; padding:0; margin:0px; text-align:center;}
#tab{ width:460px; margin:0 auto; font-size:12px;}
.menubox{ width:100%; background:url(../../img图片/CD0026.jpg); height:28px; line-height:28px;}
.menubox ul{ margin:0px; padding:0px;}
.menubox li{ float:left; display:block; cursor:pointer; width:114px; text-align:center; color:#949694; font-weight:bold;}
.menubox li.hover{ padding:0px; background:#fff; width:116px;border-bottm:none; background:url(../../img图片/CNDESK_34gjr060708202647.jpg); color:#739242; height:27px; line-height:27px;}
.contentbox{ clear:both; margin-top:0px; border:1px solid #a8c29f; border-top:none; height:181px; padding-top:8px;}
.hide{ display:none;}
</style>
</head>
<body>
<div id="tab">
<div class="menubox">
<ul>
<li id="tab_1" class="hover" onclick="setTab(1,4)">tab菜单1</li>
<li id="tab_2" onclick="setTab(2,4)">tab菜单2</li>
<li id="tab_3" onclick="setTab(3,4)">tab菜单3</li>
<li id="tab_4" onclick="setTab(4,4)">tab菜单4</li>
</ul>
</div>
<div class="contentbox">
<div id="con_1" class="hover">Tab包含框1</div>
<div id="con_2" class="hide">Tab包含框2</div>
<div id="con_3" class="hide">Tab包含框3</div>
<div id="con_4" class="hide">Tab包含框4</div>
</div>
</div>
<script>
function settab(cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementbyld("tab_"+i);
var con=document.getElementbyld("con_"+i);
menu.className=i==cursel?"block":"none";
}
}
</script>
</body>
</html>
怎么不能生成!问题出在哪?