ajax在ie10中返回空结果

时间:2014-01-17 12:58:07

标签: jquery ajax internet-explorer

我在登录页面使用jquery ajax。它适用于所有浏览器。我签到了ie。除了ie10之外它也有效。当我使用它返回空的ajax响应。这是我的编码问题还是浏览器问题?请帮助我:)。

我的ajax代码是,

$("#loading").show();   
    var postData=$("#frmLogin").serialize();

    $.ajax(
    {

        url : "ajax/ajax_formsubmit.php",
        type: "POST",
        data : postData,
        success:function(data)
        {   
            $("#loading").hide();   
            if(data=="Error"){
                $("#warning").show().html("Please provide valid login details!!!"); 
            }
            else if(data=="Success"){
                $("#success").show().html("Successfully Logined. Please wait...."); 
                window.location.href="user.php";
            }
        },
    });

1 个答案:

答案 0 :(得分:2)

我认为这可能是ie10兼容性问题。在您的代码中添加此代码

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >

参考此link