1、动态拼接html【表格中,如bootstrap grid】 return ‘ input type ="text" name ="bjce" onchange ="change(this,‘+grzh+‘,‘+rowdata.ROW_ID+ ‘)" grjcbl ="‘+rowdata.GRJCBL+‘" dwjcbl ="‘+rowdata.DWJCBL+‘" value ="‘+t
1、动态拼接html【表格中,如bootstrap grid】
return ‘<input type="text" name="bjce" onchange="change(this,‘+grzh+‘,‘+rowdata.ROW_ID+ ‘)" grjcbl="‘+rowdata.GRJCBL+‘" dwjcbl="‘+rowdata.DWJCBL+‘" value="‘+tempd+‘" class="form-control">‘;
2、js代码
function change(e,grzh,rowid){ var tr = $(e).parent().parent(); // 补缴差额 var bjce = $(e).val() || 0; // 个人缴存比例 var dwjcbl = $(e).attr("dwjcbl"); // 单位缴存比例 var grjcbl = $(e).attr("grjcbl"); tr.find("p[name=gryjce]").html(gryjce); }