2014年6月25日 星期三

JQuery CheckBox 全選

if($("#clickAll").prop("checked"))
{
   $("input[name='user_active_col[]']").each(function() {
         $(this).prop("checked", true);
   });
}
else
{
   $("input[name='user_active_col[]']").each(function() {
         $(this).prop("checked", false);
   });          
}

沒有留言:

張貼留言