在代码点火器中使用ajax提交表单时出错

时间:2016-06-29 08:10:23

标签: ajax codeigniter

我使用jquery验证在代码点火器中提交表单。 但我在CONSOLE中遇到错误

http://localhost:88/mlmm/index.php/index/[object%20RadioNodeList]无法加载资源:服务器响应状态为400(错误请求)

但我检查了我的行动是否正确

http://localhost:88/mlmm/index.php/index/submit

不知道用/ [object%20RadioNodeList]

替换/提交什么

任何人都可以帮助我

这是我的js

<script type="text/javascript">
                $("#register_f").validate({
                    rules: {
                        "enroler": {
                            required: true,
                        },  
                    },
            messages: {
                enroler: "Your Enroller's ID",
                sponser: "Your Sponsor's ID",
            },

                    //perform an AJAX post to ajax.php
                submitHandler: function(form) {
                     $(".loader").show();
                    jQuery.ajax({
                        url: form.action,
                        cache: true,
                        type: form.method,
                        data: $(form).serialize(),
                        success: function(response) {
                        alert(response);
                         if(response!=0)
                         {
                         $(".loader").hide();
                         }
                        }            
                    });
                }                
                });

</script>

http://antbdevelopers.in/register.html

0 个答案:

没有答案