gpt4 book ai didi

javascript - Jquery 表单验证

转载 作者:行者123 更新时间:2023-11-28 12:01:25 24 4
gpt4 key购买 nike

我在我的网络应用程序上使用以下验证代码

演示: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>

最佳答案

var t = setInterval(function() {
//alert('b');
$(".formErrorContent").hide();
$(".line1").hide();$(".line2").hide();$(".line3").hide();$(".line4").hide();$(".line5").hide();
$(".line6").hide();$(".line7").hide();$(".line8").hide();$(".line9").hide();$(".line10").hide();
},8000);

关于javascript - Jquery 表单验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15847486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com