日期:2014-05-17  浏览次数:20857 次

javascript脚本问题,急,帮忙看看谢谢
<script   type= "text/javascript ">
<!--
MenuShow( <%=   uClass   %> )//初始话
-->
</script>
<div   id= "menu1 "   >
<ul>
<li   class= "Showlist "   style= "width:90% "> <a   href= "# "> 会员基本信息 </a> &nbsp;|&nbsp;会员申请列表&nbsp;|&nbsp;会员过期列表&nbsp;|&nbsp;会员基本信息 </li>
</ul>
</div>

<div   id= "menu2 "   >
<ul>
<li   class= "Showlist "   style= "width:90% "> 代理合同基本信息&nbsp;|&nbsp;会员申请列表&nbsp;|会员过期列表&nbsp;|会员基本信息 </li>
</ul>
</div>

<div   id= "menu3 " >
<ul>
<li   class= "Showlist "   style= "width:90%;   "> 普通用户基本信息&nbsp;|&nbsp;会员申请列表&nbsp;|会员过期列表&nbsp;|会员基本信息 </li>
</ul>

</div>


    </div>
</div>
<script   type= "text/javascript ">
<!--
function   MenuShow(uClass)
{
var   div1,div2,div3;
div1=document.getElementById( "menu1 ");
div2=document.getElementById( "menu2 ");
div3=document.getElementById( "menu3 ");
if(uClass==1){
div1.style.display= "block ";
div2.style.display= "none ";
div3.style.display= "none ";}
                                  else{
if(uClass==2){
div1.style.display= "none ";
div2.style.display= "block ";
div3.style.display= "none ";}
else{
//div1.style.display= "none ";
//div2.style.display= "none ";
//div3.style.display= "block ";
div1.style.visibility= "hidden ";
div1.style.visibility= "visible ";
div1.style.visibility= "visible ";
}
                                      }

}
//-->
</script>

    兄弟姐妹们,这段代码为什么没有作用呢,三个菜单的内容全部显示,注:uClass值默认是1


------解决方案--------------------
<div id= "menu1 " >
<ul>
<li class= "Showlist " style= "width:90% "> <a href= "# "> 会员基本信息 </a> &nbsp;|&nbsp;会员申请列表&nbsp;|&nbsp;会员过期列表&nbsp;|&nbsp;会员基本信息 </li>
</ul>
</div>

<div id= "menu2 " >
<ul>
<li class= "Showlist " style= "width:90% "> 代理合同基本信息&nbsp;|&nbsp;会员申请列表&nbsp;|会员过期列表&nbsp;|会员基本信息 </li>
</ul>
</div>

<div id= "menu3 " >
<ul>
<li class= "Showlist " style= "width:90%; "> 普通用户基本信息&nbsp;|&nbsp;会员申请列表&nbsp;|会员过期列表&nbsp;|会员基本信息 </li>
</ul>

</div>


</div>
</div>
<script type= "text/javascript ">
<!--
function MenuShow(uClass)
{
var div1,div2,div3;
div1=do