1.
字数多的用省略号
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:when test="${bean.content!=null&&fn:length(bean.content) >30}">
${fn:substring(bean.content, 0, 30)}...</c:when>
<c:otherwise>${bean.content}</c:otherwise>
2
<script type="text/javascript">
$(function () {
$(".registerform").Validform();
tiptype: 3,
}
</script>
Validform_v5.3.2插件
define(function (require, exports, module) {
var $ = require("jquery");
(function($,win,undef){
var errorobj=null,//指示当前验证失败的表单元素;
msgobj=null,//pop box object
msghidden=true;//msgbox hidden?
var tipmsg={//默认提示文字;
tit:"提示信息",
w:{
"*":"不能为空!",
"*6-16":"请填写6到16位任意字符!",
"*0-300":"请填写0到300位任意字符!",
"n":"请填写数字!",
"n6-16":"请填写6到16位数字!",
"s":"不能输入特殊字符!",
"s6-18":"请填写6到18位字符!",
"p":"请填写邮政编码!",
"m":"请填写正确手机号码!",
"e":"邮箱地址格式不对!",
"i":"身份证格式不对!",
"url":"请填写网址!",
"sname":"不能包含空格或特殊字符!",
"sname1-10":"请填写1到10位字母或汉字!",
"idcard":"输入证件号码有误!",
"date":"日期格式不正确"
},
def:"请填写正确信息!",
undef:"datatype未定义!",
reck:"两次输入的内容不一致!",
r:"通过信息验证!",
c:"正在检测信息…",
s:"请{填写|选择}{0|信息}!",
v:"所填信息没有经过验证,请稍后…",
p:"正在提交数据…"
}
<div class="form_info" style="float: none;">
<label><em>*</em>投诉内容:</label>
<textarea name="content" cols="70" rows="5"
datatype="*0-300"></textarea>
</div>
<textarea rows="5" cols="50" name="intro" id="intro" class="form-control" dataType="*1-100" data-tip="100字以内"
字数多的用省略号
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:when test="${bean.content!=null&&fn:length(bean.content) >30}">
${fn:substring(bean.content, 0, 30)}...</c:when>
<c:otherwise>${bean.content}</c:otherwise>
2
<script type="text/javascript">
$(function () {
$(".registerform").Validform();
tiptype: 3,
}
</script>
Validform_v5.3.2插件
define(function (require, exports, module) {
var $ = require("jquery");
(function($,win,undef){
var errorobj=null,//指示当前验证失败的表单元素;
msgobj=null,//pop box object
msghidden=true;//msgbox hidden?
var tipmsg={//默认提示文字;
tit:"提示信息",
w:{
"*":"不能为空!",
"*6-16":"请填写6到16位任意字符!",
"*0-300":"请填写0到300位任意字符!",
"n":"请填写数字!",
"n6-16":"请填写6到16位数字!",
"s":"不能输入特殊字符!",
"s6-18":"请填写6到18位字符!",
"p":"请填写邮政编码!",
"m":"请填写正确手机号码!",
"e":"邮箱地址格式不对!",
"i":"身份证格式不对!",
"url":"请填写网址!",
"sname":"不能包含空格或特殊字符!",
"sname1-10":"请填写1到10位字母或汉字!",
"idcard":"输入证件号码有误!",
"date":"日期格式不正确"
},
def:"请填写正确信息!",
undef:"datatype未定义!",
reck:"两次输入的内容不一致!",
r:"通过信息验证!",
c:"正在检测信息…",
s:"请{填写|选择}{0|信息}!",
v:"所填信息没有经过验证,请稍后…",
p:"正在提交数据…"
}
<div class="form_info" style="float: none;">
<label><em>*</em>投诉内容:</label>
<textarea name="content" cols="70" rows="5"
datatype="*0-300"></textarea>
</div>
<textarea rows="5" cols="50" name="intro" id="intro" class="form-control" dataType="*1-100" data-tip="100字以内"