0

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

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

2 回答 2

4
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);
于 2013-04-06T06:17:22.403 回答
3

这段代码放在上面的标题标签上

<script>

    setInterval(function() {
        $(".formError").parent('.formErrorOuter').remove();
        $(".formError").remove();
},  2000);
</script>

试试看吧。

于 2013-04-06T06:13:15.243 回答