jquery表单验证例子
$(document).ready(function(){$.formValidator.initConfig({formid:"userAdd",onerror:function(msg){return false},onsuccess:function(){return true;}});$("#title").formValidator({onshow:"请输入邮件主题",onfocus:"请输入邮件主题!",oncorrect:"合法"}).inputValidator({min:2,onerror:"邮件主题不能为空,请确认"});$("#ctx").formValidator({onshow:"请输入邮件内容",onfocus:"请输入邮件内容!",oncorrect:"合法"}).inputValidator({min:2,onerror:"邮件内容不能为空,请确认"});});