我想点击第二个账户管理然后显示第二个字菜单,而不是显示第一个,怎么做。代码:<!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>
添加回答
举报
0/150
提交
取消