摘要:html>
全选body , ul,li {margin: 0px;padding: 0px;list-style: none;}
.box{
width:100px;
border: 2px solid #999;
margin: 20px auto;
border-radius:5px;
box-shadow:2px 2px 15px #FFC0CB;
text-align: center;
}
.box li{
margin:8px auto;
}
- 全选
- 游泳
- 健身
- 看书
- 听歌
//所有的input集合 , 设置true选中 ,false没选中
var OTag , Bool ;
//获取到标签集合
function InputTag(Tag){
if(!OTag){
OTag = document.getElementsByTagName(Tag)
}
//将全选中的checked属性值赋值给Bool
Bool = OTag[0].checked;
//从索引1开始,因为索引0是全选按钮
for(var i =1;i
OTag[i].checked = Bool;
}
}
批改老师:韦小宝批改时间:2018-11-10 09:38:09
老师总结:嗯!写的很不错!很完整!课后还得多多练习啊!