Preventing a form from submitting in jQuery Validate plugin's submitHandler function

后端 未结 8 1652
花落未央
花落未央 2020-12-08 07:24

I am using jQuery with the validate plugin at http://docs.jquery.com/Plugins/Validation/validate

I want to prevent the form from submitting after its validation and

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 08:12

    Maybe you can validate externally without using a submit button:

    if($("#myform").valid()){
        alert("Do some stuff...");
    }
    

提交回复
热议问题