abstract:<!DOCTYPE html><html> <head> <title>页面中常用平级下拉菜单(手风琴)</title> <meta charset="UTF-8"> <
<!DOCTYPE html>
<html>
<head>
<title>页面中常用平级下拉菜单(手风琴)</title>
<meta charset="UTF-8">
<link rel="shortcut icon" href="static/images/logo.png" type="image/x-icon" />
<link rel="stylesheet" href="static/css/style.css" type="text/css">
<script type="text/javascript" src="static/js/jquery.js"></script>
<script type="text/javascript">
$(function(){
$('.two').css('display','none')
var one=$('.one')
var two=$('.two')
$('.one').each(function(i){
$(this).click(function(){
if($(two[i]).css('display')=='none'){
$(two[i]).slideDown(400)
}else{
$(two[i]).slideUp(400)
}
})
})
})
</script>
</head>
<body>
<div class="nav">
<div class="parent">
<div class="one">
<strong>个人中心</strong>
</div>
<div class="two">
<div><a href="">我的信息</a></div>
<div><a href="">系统通知</a></div>
<div><a href="">短信息</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>课程中心</strong>
</div>
<div class="two">
<div> <a href="#">我的课程</a></div>
<div> <a href="#">课程资源</a></div>
<div> <a href="#">班级统计</a></div>
<div> <a href="#">课程题库</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>校内讨论</strong>
</div>
<div class="two">
<div> <a href="#">我的帖子</a></div>
<div> <a href="#">新回复</a></div>
<div> <a href="#">课程板块</a></div>
<div> <a href="#">问答中心</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>资源中心</strong>
</div>
<div class="two">
<div> <a href="#">教学资源</a></div>
<div > <a href="#">教学经历</a></div>
</div>
</div>
</div>
</body>
</html>
Correcting teacher:天蓬老师Correction time:2018-12-31 22:01:38
Teacher's summary:$(two[i]).slideDown(400)简单的收缩与展开,用jQuery就可以实现,用原生至少要100多行代码