Code Broadcast point:
PS: Picture yourself Change OH
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Untitled Document </title>
<style type= "Text/css" >
. ul1{margin:20px 0px;}
. Ul1.before,.ul1.after{display:table;content: "";}
. Ul1.after{clear:both}
. UL1 li{width:100px;list-style:none;float:left;border:1px solid #000; margin-right:10px;}
img{width:100px;height:100px;}
</style>
<body>
<p> which elf do you like? </p>
<input type= "button" value= "Select All"/>
<input type= "button" value= "Deselect All"/>
<ul class= "UL1" >
<li><input type= "checkbox" name= "Check"/><span> kite 10 percent paper </span> </li>
<li><input type= "checkbox" name= "Check"/><span> when Saitama III </span> </span></li>
<li><input type= "checkbox" name= "Check"/><span> Wuhe piano </span> </li>
<li><input type= "checkbox" name= "check"/><span> Night knife God 10 incense </span ></li>
<li><input type= "checkbox" name= "check"/><span> eating cat fish </span> </li>
</ul>
<script>
var abtn = document.getelementsbytagname ("input");
Abtn[0].onclick = function () {
for (Var i=0;i<abtn.length;i++) {
Abtn[i].checked = true;
}
}
Abtn[1].onclick = function () {
for (Var i=0;i<abtn.length;i++) {
abtn[i].checked = false;
}
}
</script>
</body>
Web front end of the day to learn a little JS Knowledge phase II