diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 89faf39e3..62312932d 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -90,7 +90,7 @@ function f_submit() { var subject = $("#memo_subject").val(); var content = $("#memo_content_1").val(); - $("#memo_subject").val(subject+":"+ content.substr(0,18)); + $("#memo_subject").val(subject+":"+ content.substr(0,18)+"..."); $("#new_memo").submit(); } @@ -137,6 +137,20 @@ function cookieget(n) durationTime : 600 }); }); + + $(document).ready(function(){ + $("#memo_content_1").keydown(function(){ + var curLength=$("#memo_content_1").val().length; + if(curLength>=50){ + var num=$("#memo_content_1").val().substr(0,49); + $("#memo_content_1").val(num); + alert("超过意见反馈内容字数限制,多出的内容将被截断!" ); + } + else{ + $("#textCount").text(49-$("#memo_content_1").val().length) + } + }) + })