开发者

jQuery.load doesn't work in IE?

开发者 https://www.devze.com 2023-01-21 15:07 出处:网络
This works in FF, but not in IE 7 and 8.Is there anyway to make it work in IE? setInterval(function() {

This works in FF, but not in IE 7 and 8. Is there anyway to make it work in IE?

setInterval(function() {
    $("#content").load(location.href+" #content>*","");
}, 5000);

(this code is from http://blog.mediasoft.be/partial-page-开发者_高级运维refresh-with-ajax-and-jquery/)


I'm not sure what the last "" is, but it can be left off, IE may have trouble with the empty data param:

setInterval(function() {
    $("#content").load(location.href+" #content>*");
}, 5000);


Is there any javascript in the returned HTML? Is so, that could be causing the problem. Remove the javascript and put in the parent page in a callback function.

0

精彩评论

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