Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过jQuery验证进行身份验证_Jquery_Asp.net_Webforms_Jquery Validate - Fatal编程技术网

通过jQuery验证进行身份验证

通过jQuery验证进行身份验证,jquery,asp.net,webforms,jquery-validate,Jquery,Asp.net,Webforms,Jquery Validate,我使用jQuery验证。我在submitHandler中检查数据 我读到它非常好,但我想在表单有效时进行身份验证,我想通过jQuery验证而不是jQuery进行验证。ajax有解决方案吗 $("#signupForm").validate({ rules: { username: "required", password: "required", }, mes

我使用jQuery验证。我在submitHandler中检查数据

我读到它非常好,但我想在表单有效时进行身份验证,我想通过jQuery验证而不是jQuery进行验证。ajax有解决方案吗

 $("#signupForm").validate({
            rules: {
                username: "required",
                password: "required",
            },
            messages: {
                username: "required",
                password: "required",
            },
            submitHandler: function () {
                $.ajax
                    ({
                        type: "POST",
                        url: "authenticate.ashx",
                        dataType: 'json',
                        async: false,
                        data: '{"userName": "' + userName + '", "password" : "' + password + '"}',
                        success: function () {
                        }
                    });
            }

jqueryvalidation是一个用于在客户端验证表单控件的插件,它不负责服务器端通信,如向服务器提交数据

您将需要使用ajax来完成这项工作