作者:1個穷小子_969 | 来源:互联网 | 2014-08-26 14:19
1、首先需要导入js包和css包:http:download.csdn.netdetaill29433347578169512、index.jsp(测试页面)<%Stringpath=request.getContextPath();StringbasePath=request.getScheme()
1、首先需要导入js包和css包:http://download.csdn.net/detail/l294333475/7816951
2、index.jsp(测试页面)
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
validate.js:(可根据自己要求修改)
$(document).ready(function() {
/**
* 确认信息验证
*/
jQuery("#checkInfoForm").validationEngine();
/**
* 自定义信息验证
*/
jQuery("#applyForm").validationEngine({
&#39;custom_error_messages&#39;: {
&#39;#txtKeyNum&#39;: {
&#39;min&#39;: {
&#39;message&#39;: "请至少输入一把电子钥匙数量"
}
},
&#39;#fileSeal&#39;: {
&#39;required&#39;: {
&#39;message&#39;: "请上传一个印章图片文件"
}
},
&#39;#fileSign&#39;: {
&#39;required&#39;: {
&#39;message&#39;: "请上传一个签名图片文件"
}
}
}
});
});