$(".t1").blur(function () {
var td = $(".t1"); var txt = td.text(); var newtxt = $(this).val(); if (newtxt != txt) { td.html(newtxt); } else { td.html(newtxt); } console.log(newtxt); $.ajax({ type: "POST", url: "UpdateMySign", data: { MySign: newtxt }, dataType: "html", error: function () { layer.msg('服务器繁忙,请稍后再试!', { offset: '15px', icon: 2, time: 1000 }); }, success: function (json) { if (json.code > 0) { layer.msg('上传失败,' + json.msg, { offset: '15px', icon: 2, time: 1000 }); } else { //var index = parent.layer.getFrameIndex(window.name); parent.layer.msg('修改成功'); //location.reload(); } } }); });