Home > php教程 > php手册 > jQuery 实现复选框全选、反选、按住shift键连续选择

jQuery 实现复选框全选、反选、按住shift键连续选择

WBOY
Release: 2016-06-07 11:43:20
Original
1827 people have browsed it

jQuery 实现复选框全选、反选、按住shift键实现多项连续选择
$('#demo1 div.checkbox').shiftcheckbox({<br>   checkboxSelector: ':checkbox',<br>   selectAll: $('#demo1 .all'),<br>   // The onChange function will be called whenever the plugin changes the state of a checkbox.<br>   onChange: function(checked) {<br>     setInfoText('Changed checkbox ' + $(this).attr('id') + ' to ' + checked + ' programmatically');<br>   }<br> });<br> <br> // If you also want to handle the user clicking on a checkbox, use the jQuery .change() event.<br> $('#demo1 :checkbox').change(function() {<br>   setInfoText('Clicked checkbox ' + $(this).attr('id') + ', checked=' + this.checked);<br> });

附件 shiftcheckbox-gh-pages.zip ( 38.07 KB 下载:205 次 )

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

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template