======================== 实际代码 ===============================
$("#inputCell").blur(function () { var newValue = $("#inputCell").val(); if(row[field] != newValue){ //如果改变放出保存按钮 $("#save_payService").attr("disabled", false); } if(newValue == "" && field == "itemValue") { newValue = 0; } row[field] = newValue; $(this).remove(); $('#payServiceTbl').bootstrapTable('updateCell', { index: upIndex, field: field, value: newValue }); }).keyup(function () { if (event.keyCode == 13) { $(this).blur(); } });