$('body').on("click","tr",function(){
if ($(this).find(":checkbox").prop("checked")) { 此處要用prop不能用attr,至于為什麼你測試一下就知道了
$(this).find(":checkbox").removeAttr("checked");
}else{
$(this).find(":checkbox").prop("checked", true);
}
});