JS 使用Jquery为<a>设置href
$(function(){ $("#chkAll").click(function(){ if($(this).attr("checked")==true){ $("input[name='check']").each(function(){ $(this).attr("checked",true); }); }else{$("input[name='check']").each(function(){ $(this).attr("checked",false); });} }); });