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元