1》》》

今天实现一个 点击更新按钮 ,可以勾选上本行的的checkbox的功能:

使用代码:

 1 /**
 2      * updateproduct.htmls  更新 产品信息
 3      */
 4     $(document).on("click",".table-bordered tbody tr a[class='up']",function(){
 5         product = $.parseJSON( $(this).parents('tr').find("input").eq(1).val());
 6         $(this).parents('tr').find("input[type='checkbox']").attr("checked",true);//在点击更新按钮之后,勾选本行对应的checkbox
 7         indexProductUpdate    = layer.open({
 8             type: 2,
 9             title: "修改产品",
10             content: 'updateproduct.htmls',
11             area: ['500px', '580px'],
12             end : function(){
13                 $(".table-bordered tbody :checked").attr("checked",false);
14             }
15         });    
16     });
View Code

相关文章:

  • 2018-05-27
  • 2021-10-08
猜你喜欢
  • 2021-10-22
  • 2021-11-20
  • 2022-12-23
  • 2022-03-10
  • 2021-06-15
  • 2021-07-15
  • 2021-11-13
相关资源
相似解决方案