...
|
...
|
@@ -63,7 +63,7 @@ |
|
|
<span style="color:red">*</span><label>文字内容</label> <br>
|
|
|
<div style="width:800px; word-wrap:break-word;float: left;position: relative" >
|
|
|
<textarea rows="5" id="content" style="width:60%; white-space: pre-wrap;" name = "content" class="form-control" placeholder="请在这里输入1-500字的笔记" required="" maxlength="500"></textarea>
|
|
|
<!--<div style="position: absolute;bottom:0;right:-50px"> <span id="content-count">0</span>/500</div>-->
|
|
|
<div style="position: absolute;bottom:0;right:-50px"> <span id="content-count">0</span>/500</div>
|
|
|
|
|
|
</div>
|
|
|
</td>
|
...
|
...
|
@@ -216,14 +216,23 @@ |
|
|
});
|
|
|
|
|
|
/*字数限制*/
|
|
|
$("#content").on("input propertychange", function() {
|
|
|
// $("#content").on("input propertychange", function() {
|
|
|
// debugger
|
|
|
// var $this = $(this);
|
|
|
// var count = $this.val().length;
|
|
|
// $("#content-count").text(count);
|
|
|
// });
|
|
|
/*字数限制*/
|
|
|
$("#content").on("keydown keyup mousedown change", function() {
|
|
|
debugger
|
|
|
var $this = $(this);
|
|
|
var count = $this.val().length;
|
|
|
if(count>500){
|
|
|
$.messager.alert("发布失败", "内容长度超过500,请重新输入", "error");
|
|
|
}
|
|
|
$("#content-count").text(count);
|
|
|
});
|
|
|
|
|
|
|
|
|
$("#labelId").combobox({
|
|
|
prompt: "请选择标签",
|
|
|
required: false,
|
...
|
...
|
@@ -530,10 +539,10 @@ |
|
|
|
|
|
$("#content").val(data.articleContent);
|
|
|
/*字数限制提示*/
|
|
|
// if(data.articleContent !=null && data.articleContent !=''){
|
|
|
// var count = data.articleContent.length;
|
|
|
// $("#content-count").text(count);
|
|
|
// }
|
|
|
if(data.articleContent !=null && data.articleContent !=''){
|
|
|
var count = data.articleContent.length;
|
|
|
$("#content-count").text(count);
|
|
|
}
|
|
|
|
|
|
var labelIds = [];
|
|
|
if(data.labelList!=null && data.labelList.length>0){
|
...
|
...
|
|