++复制代码++ 代码如下:
//反选
function selectnoALL() {
$("input:checkbox").each(function (i) {
if (this.checked) {
this.checked = false;
} else {
this.checked = true;
}
});
}
//全选
function selectALL() {
var chelength = $("input:checkbox").length;
$("input:checkbox").each(function (i) {
if (i < chelength - 2) {
this.checked = true;
}
});
}
3分钟写出来的 估计很多bug