jquery实现让所有的checkbox全选反选
<script src="../Js/jquery-1.6.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#all_check").click(function () {
if ($("#all_check").attr("checked")) {
$("#joblisttable").find(":checkbox").each(function () {
if ($(this).attr("id") != "all_check")
$(this).attr("checked", true);
});
} else {
$("#joblisttable").find(":checkbox").each(function () {
// if ($(this).attr("id") != "allcheck")
$(this).attr("checked", false);
});
}
});
});
</script>