</pre><pre name="code" class="javascript">var dataJson={
"BankName": {
"value": "",
"description": "银行名称",
"type": "int",
"sort": "1"
},
"DeductPrice": {
"value": "",
"description": "立减金额",
"type": "float",
"sort": "2",
"child":
{
"StartDeductRange": {
"value": "123",
"description": "立减开始范围"
},
"EndDeductRange": {
"value": "123.1",
"description": "立减结束范围"
},
"DeductRangePrice": {
"value": "121",
"description": "立减范围金额"
}
}
},
"PlatForm": {
"value": "",
"description": "预订平台",
"type": "float",
"sort": "3"
}
};
for (var json in dataJson) {
if (eval("dataJson." + json + ".child")) {
startDeductRange = " value='" + eval("dataJson." + json + ".child")[item].StartDeductRange.value + "'";
endDeductRange = " value='" + eval("dataJson." + json + ".child")[item].EndDeductRange.value + "'";
deductRangePrice = " value='" + eval("dataJson." + json + ".child")[item].DeductRangePrice.value + "'";
strController += "<tr id='tr" + intIndex + "'>"
+ "<td>开始范围:<input style=' width:50px'; type='text'"
+ startDeductRange + " οnkeyup='inputFloat(this);' />"
+ "</td><td>结束范围:<input style=' width:50px;' type='text' "
+ endDeductRange + " οnkeyup='inputFloat(this);' />"
+ "</td><td>立减金额:<input style=' width:50px;' type='text' "
+ deductRangePrice + " οnkeyup='inputFloat(this);' />";
strController += "</td><td><a id='deleteLink1' οnclick='deleteTr(tr" + intIndex + ");'>删除</a> <a id='addLink" + intIndex + "' οnclick='addTr(this);' style='display:none;'>新增</a></td>"
+ "</tr>";
intIndex++;
}
}
</pre><pre code_snippet_id="268573" snippet_file_name="blog_20140401_1_2551640" name="code" class="javascript">