我在我的网络应用程序上使用以下验证代码
演示:http ://www.position-relative.net/creation/formValidator/demos/demoValidators.html
10秒后有没有办法隐藏那个弹出的东西?现在,当您提交时,它会继续显示....
这些是用于产生这种效果的代码
http://www.position-relative.net/creation/formValidator/js/languages/jquery.validationEngine-en.js http://www.position-relative.net/creation/formValidator/js/jquery.validationEngine.js
<script>
jQuery(document).ready(function(){
// binds form submission and fields to the validation engine
jQuery("#formID").validationEngine();
});
/**
*
* @param {jqObject} the field where the validation applies
* @param {Array[String]} validation rules for this field
* @param {int} rule index
* @param {Map} form options
* @return an error string if validation failed
*/
function checkHELLO(field, rules, i, options){
if (field.val() != "HELLO") {
// this allows to use i18 for the error msgs
return options.allrules.validate2fields.alertText;
}
}
</script>