<script>
let normalListData = [];
function temp() {
for (var i = 0; i < 10; i++) {
let rowCellInfo = {
Name: '医疗保险', /// 险种
EnterpriseNumberFloor: -1, /// 单位基数下限
EnterpriseNumberCeiling: -1, /// 单位基数上限
}
var tempString ="<input type=\"text\" class=\"layui-input rowInput\" oninput='BindNormalModel(this,\"EnterpriseNumberCeiling\"");'>";
}
normalListData.push(rowCellInfo);
} function BindNormalModel(obj, name) {
normalListData[index][name] = $(obj).val();//在这里,确定属性名的情况下写法为:normalListData[0].EnterpriseNumberCeiling,但由于属性名是不确定的,jQuery不解析normalListData[0].name,所以改用 normalListData[index][name]获取
} </script>