Home  >  Article  >  php教程  >  jquery全选、反选、全不选

jquery全选、反选、全不选

WBOY
WBOYOriginal
2016-06-07 11:42:201159browse

jquery全选、反选、全不选
Jquery代码!function ($) {<br>     //全选 反选 全不选<br>     $("#selAll").click(function () {<br>         $(".lists :checkbox").not(':disabled').prop("checked", true);<br>     });<br>     $("#unSelAll").click(function () {<br>         $(".lists :checkbox").not(':disabled').prop("checked", false);<br>     });<br>     $("#reverSel").click(function () {<br>         //遍历.lists下的 checkbox;<br>         $(".lists :checkbox").not(':disabled').each(function () {<br>             $(this).prop("checked", !$(this).prop("checked"));<br>         });<br>     });<br> }(jQuery)HTML代码<input><br> <input><br> <input><br> <div> <br>     <input> 苹果<br>     <input> 香蕉<br>     <input> 菠萝<br>     <input> 桃子<br> </div>个站地址:http://www.yi210.com/?p=922

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn