我想點擊第二個賬戶管理然后顯示第二個字菜單,而不是顯示第一個,怎么做。代碼:<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html?xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>無標題文檔</title>
</head>
<script?type="text/javascript">
function?da()
{
if(document.getElementById('Ubsl').style.display?==?'none')
{
document.getElementById('Ubsl').style.display='block';
}else{
document.getElementById('Ubsl').style.display='none';
}
}
</script>
<style?type="text/css">
*{
padding:?0px;margin:?0px;
}
body{
background-color:?#3567C4;
}
ul{
margin-top:10px;height:25px;line-height:?25px;
border-top:?2px?solid?#3E9AAE;border-bottom:?2px?solid?#3E9AAE;
background-color:?#2E7492;padding-left:?15px;
text-decoration:?none;
}
ul:hover{
background-color:?#ffffff;
color:?#000000;
}
.ziboss?li:hover{
background-color:?#ffffff;
color:?#000000;
}
a{
text-decoration:?none;
}
a?ul{
font-size:?14px;font-family:?"楷體";
color:?#000000;
}
.ziboss{
width:?154px;line-height:?25px;margin-top:?-4px;
background-color:?#BEBEBE;margin-left:?40px;display:?none;
border-left:?2px?solid?#3E9AAE;border-bottom:?2px?solid?#3E9AAE;
}
.ziboss?li{
list-style:none;background-color:?#628678;
padding-left:?30px;margin-top:2px;
}
</style>
<body>
<div>
<a?href="#"?onclick="da()"><ul>賬戶管理</ul></a>
<div?class="ziboss"?id="Ubsl">
<li>12</li>
<li>12</li>
<li>12</li>
<li>12</li>
</div>
</div>
<div>
<a?href="#"?onclick="da()"><ul>賬戶管理</ul></a>
<div?class="ziboss"?id="Ubsl">
<li>12</li>
<li>12</li>
<li>12</li>
<li>12</li>
</div>
</div>
</body>
</html>
js 后臺管理導航點擊問題
慕村1106498
2017-06-06 21:55:58