<div class="codetitle"> <span><a style="CURSOR: pointer" data="65319" class="copybut" id="copybut65319" onclick="doCopy('code65319')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code65319"> <br><!DOCTYPE html> <br><html> <br><머리> <br><script type="text/javascript" src="../js/jquery-1.9.1.js"></script> <br><script type="text/javascript"> <br>$(document).ready(function() { <br>// 전체选/取消전체부 <br>$("#checkAllChange").click(function() { <br>if (this.checked = = true) { <br>$(".userid").each(function() { <br>this.checked = true; <br>}) <br>} else { <br>$(".userid ").each(function() { <br>this.checked = false; <br>}); <br>} <br>}); <br>// 전체选 <br>$("#checkAll" ).click(function() { <br>$(".userid").each(function() { <br>this.checked = true; <br>}); <br>}); / 取消전체부 <br>$("#removeAll").click(function() { <br>$(".userid").each(function() { <br>this.checked = false; <br>} ); <br>}); <br>// 反选 <br>$("#reverse").click(function() { <br>$(".userid").each(function() { <br>if (this.checked == true) { <br>this.checked = false; <br>} else { <br>this.checked = true; <br>}) <br>}); <br>//批weight删除 <br>$("#delAll").click(function() { <br>var arrUserid = new Array(); <br>$(".userid").each(function( i) { <br>if (this.checked == true) { <br>arrUserid[i] = $(this).val() <br>} <br>});删除的:" arrUserid); <br>}); <br>}); <br></script> <br></head> <br><br><본문> <br><table border="1"> <br><tr> <br><td><input type="checkbox" id="checkAllChange" /></td> <br><td>사용 ID</td> <br><td>용도명</td> <br><td>电话</td> <br><td>地址</td> <br></tr> <br><tr> <br><td><input type="checkbox" class="userid" value="1" /></td> <br><td>1</td> <br><td>wangzs1</td> <br><td>18888000</td> <br><td>浦东</td> <br></tr> <br><tr> <br><td><input type="checkbox" class="userid" value="2" /></td> <br><td>2</td> <br><td>wangzs2</td> <br><td>18888001</td> <br><td>상해</td> <br></tr> <br><tr> <br><td><input type="checkbox" class="userid" value="3" /></td> <br><td>3</td> <br><td>wangzs3</td> <br><td>18888002</td> <br><td>河南</td> <br></tr> <br><tr> <br><td><input type="checkbox" class="userid" value="4" /></td> <br><td>4</td> <br><td>wangzs4</td> <br><td>18888003</td> <br><td>许昌</td> <br></tr> <br><tr> <br><td></td> <br><td><input type="button" id="checkAll" value="전체选" /></td> <br><td><input type="button" id="removeAll" value="取消전체부" /></td> <br><td><input type="button" id="reverse" value="反选" /></td> <br></tr> <br><tr> <br><td colspan="4" align="center"><input type="button" value="批weight删除" id="delAll"></td> <br></tr> <br></테이블> <br></body> <br><br></html> <br><br> </div>