html jQuery table tr使用each()遍历获取很一行里边的内容包括input By勤勤学长

  $("table tr").each(function(){
  var attr =$(this).closest("tr").find('input[name="attr[]"]').val();
  var spec_id =$(this).closest("tr").find('input[name="spec_id[]"]').val();
  var sell_price =$(this).closest("tr").find('input[name="sell_price[]"]').val();
  console.log(attr,spec_id,sell_price);
  });

猜你喜欢

转载自blog.csdn.net/qq318692996/article/details/80235656