Jquery.Validation IE and FF issue


Jquery.Validation IE and FF issue

大家好,我在使用jQuery验证插件时遇到了问题。 该代码在 chromeOpera 中运行良好,而在 EI 版本 10.0.xx 和 FF 版本中则不行23.xx 每当我单击按钮提交表单时,它都不起作用

     <script src="style/js/jquery.js"></script>
    <script src="style/js/jquery.validate.js"></script>
<script type="text/javascript" src="style/js/jquery.form.js"></script>
      <script type="text/javascript">
      $(document).ready(function(){
            var kosh = document.getElementById("username").value;
            $("#form").validate({
                rules:{
                    full_name:"required",
                    user_name:"required",
                    secret:"required",
                    user_email:{
                            required:true,
                            email: true
                        },
                    pwd:{
                        required:true,
                        minlength: 8
                    },
                    cpwd:{
                        required:true,
                        equalTo: "#pwd"
                    },
                    gender:"required",
                    privacy:"required"
                },
                messages:{
                    full_name:"Enter your first and last name",
                    user_name:"Please Chose a Username",
                    secret:"Your Secret Word Can't Be Empty",
                    user_email:{
                        required:"Enter your email address",
                        email:"Enter valid email address"
                    },
                    pwd:{
                        required:"Enter your password",
                        minlength:"Password must be minimum 8 characters"
                    },
                    cpwd:{
                        required:"Enter confirm password",
                        equalTo:"Password and Confirm Password must match"
                    },
                    gender:"Select Gender",
                    privacy:"Select How you like to share your photos with others"
                },
                errorClass: "help-inline",
                errorElement: "span",
                highlight:function(element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function(element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                    $(element).parents('.control-group').addClass('success');
                }
            });         
$('document').ready(function()
{
$('#form').ajaxForm( {
target: '#preview', 
success: function() { 
$('#formbox').slideUp('fast'); 
} 
}); 
$('#loginForm').ajaxForm( {
target: '#preview', 
success: function() { 
$('#formbox').slideUp('fast'); 
} 
});
});
        });
      </script>

和我的表格如下

          <form action="func/login.php" id="loginForm" name="loginForm" method="post" class="navbar-form pull-right">
          <input required class="input-large" name="user" placeholder="Your Username..." type="text">
          <input  required type="password" name="pass"  placeholder="Your Password" class="input-large">
        <button class="btn btn-success">Login !</button>
        <a href="reset.php"><span style="color:#fff; position:relative; top:3px; align:center; font-family:verdana;padding:3px; font-size:10px">Forgot Password?</span></a>
      </form>

假设如果我输入了错误的用户名和密码,它实际上会返回结果,但是只要用户名和密码正确,它就不会从 PHP 脚本中获取结果,如果用户名和密码正确,它会自动加载index.php但它不会加载它,但我已经登录了,如果我在 URL 栏中输入index.php

通过替换来修复它

echo'<meta http-equiv="refresh" content="0;URL=index.php">';

echo'<script>document.location.href="index.php"</script>';
我不知道

为什么FF和IE不接受元标记