动态列表效果
点击按钮 一部分被隐藏或显示 :
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="jquery-1.11.3.js"></script>//引入调用
<style type="text/css">//设置css样式
#box{
width: 600px;
height: 600px;
margin:0 auto;
}
td{
width: 200px;
height: 50px;
text-align: center;
}
#inp{
width: 600px;
text-align: center;
margin:0 auto;
}
input{
width: 100px;
height: 40px;
}
</style>
<script type="text/javascript">//jquery设置 关键部分
$(function(){
$("input").click(function(){
$(".a1").toggle();
});
});
</script>
</head>
<body>
<div id="box">
<table border="0" cellspacing="0" cellpadding="0"id="table1">
<tr>
<td><a href="#">佳能</a>(30440)</td>
<td><a href="#">索尼</a>(30440)</td>
<td><a href="#">三星</a>(30440)</td>
</tr>
<tr>
<td><a href="#">尼康</a>(30440)</td>
<td><a href="#">松下</a>(30440)</td>
<td><a href="#">卡西欧</a>(30440)</td>
</tr>
<tr>
<td class="a1"><a href="#">富士</a>(30440)</td>
<td class="a1"><a href="#">柯达</a>(30440)</td>
<td class="a1"><a href="#">宾得</a>(30440)</td>
</tr>
<tr>
<td class="a1"><a href="#">理光</a>(30440)</td>
<td class="a1"><a href="#">奥林巴斯</a>(30440)</td>
<td class="a1"><a href="#">明基</a>(30440)</td>
</tr>
<tr>
<td class="a1"><a href="#">爱国者</a>(30440)</td>
<td class="a1"><a href="#">其他品牌相机</a>(30440)</td>
</tr>
</table>
<div id="inp">
<input type="button" id="" value="收放"onclick="change()" />
</div>
</div>
</body>
</html>2019-01-17