jquery 中获取所有选中的checkbox的用法

源:http://hi.baidu.com/yy3b2007com/item/ee73b8c2e25dc33944941684
评:
jquery 中获取所有选中的checkbox的用法

$("input:checkbox[name='the checkbox name']:checked")

或者

$($("table#tbTemplate input[type='checkbox']"),function(index, element){

     if($(element).checked){

          // keep the state. or log this checked......

     }

});

猜你喜欢

转载自mauersu.iteye.com/blog/2038932