如果你的网站模板用的是官方默认的话,请在整站目录下按照这个路径template/default/bencandy_tpl找到文件comment.htm,然后去第129行找到这个代码:
复制代码 -
- if(document.getElementById("comment_content").value==''){
- alert('内容不能为空!');
- return false;
- }
|
-
- if(document.getElementById("comment_content").value==''){
- alert('内容不能为空!');
- return false;
- }
在他的下面加上如下代码:
- if(document.getElementById("comment_content").value.length <= 100){
- alert('内容不能少于100个字!');
- return false; }
复制代码 - if(document.getElementById("comment_content").value.length <= 100){
- alert('内容不能少于100个字!');
- return false; }
|
加上好保存,然后将网站的对应的页面刷新一下,比如你正在看某一篇文章,将该页面刷新一下,然后再试试看评论,就可以看到效果了。