通过ajax加载的Div内容不会出现在IE中 [英] Div content loaded via ajax doesn't appear in IE
本文介绍了通过ajax加载的Div内容不会出现在IE中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是ajax调用:
function loadContent( url ) {
jQuery.ajax({
url: url,
success: function(data)
{
// set content
jQuery("#overlayDiv").html(data);
// hide loading spinner
jQuery("#overlayCleared").hide();
}
});
}
除IE之外的所有其他浏览器都能正常工作,其中div仍然存在空.. :(
It works fine in all the other browsers except IE, in which the div remains empty.. :(
我正在使用的CSS是:
The css I'm using is:
div#overlayDiv {
overflow: auto;
position: relative;
height: 95%;
}
div.video_overlay { /* this class will be added to the div using jQuery */
padding-left: 0px;
width: inherit;
top: 35px;
}
我该怎么办?
非常感谢
推荐答案
几天前我遇到了同样的问题,我只是做了这个改变,它解决了这个问题。
i ran into the same issue a couple of days ago and i simply made this change and it fixed the problem.
(*考虑url指向localhost)
确保你的url在测试时指向127.0.0.1,例如;
(*Considering the url points to localhost) ensure that your url points to 127.0.0.1 when testing on ie e.g;
使用 - -----> http://127.0.0.1/
而不是----> < a href =http:// localhost / =nofollow> htt p:// localhost /
use ------> http://127.0.0.1/ instead of ----> http://localhost/
这篇关于通过ajax加载的Div内容不会出现在IE中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文