<script language="javascript">
//第一次单击时的状态:
var zt=true;
function mm()
{
if(zt==true){zt=false;}else{zt=true;}
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++) if (a[i].type == "checkbox") a[i].checked = zt;
}
</script>
<form id="form1" name="form1" method="post" action="">
<input type="button" name="button" id="button" value="单击此处" onclick="mm()" />
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="checkbox" name="checkbox2" id="checkbox2" />
<input type="checkbox" name="checkbox3" id="checkbox3" />
<input type="checkbox" name="checkbox4" id="checkbox4" />
<input type="checkbox" name="checkbox5" id="checkbox5" />
<input type="checkbox" name="checkbox6" id="checkbox6" />
<input type="checkbox" name="checkbox7" id="checkbox7" />
<input type="checkbox" name="checkbox8" id="checkbox8" />
<input type="checkbox" name="checkbox9" id="checkbox9" />
<input type="checkbox" name="checkbox10" id="checkbox10" />
<input type="checkbox" name="checkbox11" id="checkbox11" />
<input type="checkbox" name="checkbox12" id="checkbox12" />
<input type="checkbox" name="checkbox13" id="checkbox13" />
<input type="checkbox" name="checkbox14" id="checkbox14" />
<input type="checkbox" name="checkbox15" id="checkbox15" />
<input type="checkbox" name="checkbox16" id="checkbox16" />
<input type="checkbox" name="checkbox17" id="checkbox17" />
</form>
jQuery鼠标上下滚动触发事件调用的写法
jQuery鼠标上下滚动触发事件调用的写法 <script> 阅读更多…