class样式实现个人签名,一定字数后省略号取代后面内容
2018-11-21 14:18 马尔代夫_珍 阅读(304) 评论(0) 编辑 收藏 举报 $(".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();
}
}
});
});