简体   繁体   中英

submit handler of the jquery validate plugin not working in ie (including ie9)

I have a simple registration form in which I used the jquery validate plugin. I made all validations and they work properly in all internet explorers, the problem is that after the validations, the function does not work in ie submitHandler and the form is sent to the default action.

The submit handler function works in firefox, chrome, safari, opera least in internet explorer.

this is a sample code I tried:

$("#Myform").validate({
    rules:{
       name:{ required: true },
       email:{ required: true },
       phone:{ required: true, email: true }
    },
    submitHandler: function(form){
       alert("Form sent");
    }
});

could someone help me? thanks

Did you try this?

submitHanlder: function(form) {
    form.submit();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM