自己创建的table:
<div class="tile-body"> <table class="table table-hover table-bordered" id="getProductCost"> </table> </div>
function queryProductCost(){ $("#getProductCost").html('');; $.ajax({ url : '/userCenter/queryProductCost', dataType : 'json', data:product, type : 'post', success : function(data) { if (data && data.returnCode == '0000') { var productCosttr ='<tr >' + '<th class="center">产品名称</th>' + '<th class="center">第一年佣金比例</th>' + '<th class="center">第二年佣金比例</th>' + '<th class="center">第三年佣金比例</th>' + '</tr>'; var list = data.content; if(list!=null && list.length>0){ for(var i =0;i<list.length;i++){ productCosttr += `<tr> <td>`+list[i].productName+`<input type="hidden" id="productId" value="`+list[i].productId+`" class='productId' > </td> <td><input type='text' oninput = "value=value.replace(/[^\\d]/g,'')" value="`+list[i].rateYear1+`" class='rateYear1' ></td>`; if