开发者

jQuery Ajax request returning null in Internet Explorer only

I'm trying to GET an HTML document using the jQuery ajax() method.

When I try and parse the returned data using $(data) all browsers other than Internet Explorer are returning a DOM element, whereas Internet Explorer is returning NULL.

I've checked 'data' and it's a string as expected.

What might cause this? I'm guessing it could be errors in the markup being pulled in, but I can't spot anything in the validation?

I'm using jQuery 1.4.2.

jQuery.ajax({
    url: url,
    cache: fa开发者_运维问答lse,
    contentType: 'html',
    processData: false,
    success: function(data) {
        console.log($(data));
    }
});


Be sure that your URL variable don't link to the XHTML page. Otherwise there are many problems with Internet Explorer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜