Jquery常用操作
1.全选
$("#select-all").change(function(){ //prop可检查标签里是否有某个属性 var checked = $(this).prop("checked"); $("input[name=select][type=checkbox]:not([disabled])").each(function(){ $(this).prop(\'checked\',checked); }) })
2.选择table下的行
$("table tr[data-id]").each(function(){}
3.选择标签中勾选过的内容
if($checkbox.prop(\'disabled\') || !$checkbox.prop(\'checked\')){return;}
var $input = $(this).find(\'input[name=amount]\');
版权声明:本文为bing2017原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。