checkbox反选 jquery 操作简单易行

listTb.find('.chk-box').each(function (i) {
      var _this = $(this);
      _this.attr('checked',!_this.get(0).checked);
});        
listTb.find('.chk-box'):所有checkbox复选框的集合
核心语句:
_this.attr('checked',!_this.get(0).checked);


posted @ 2014-10-22 10:50  Zell~Dincht  阅读(78)  评论(0编辑  收藏  举报