【发布时间】:2012-12-14 00:07:23
【问题描述】:
我需要将配置 XML 加载到 DIV 中,为此我使用以下代码:
$(document).ready(function(){
console.log("Document ready");
$("#footer_config").load("/config/footer_config.xml");
});
这段代码在 Chrome 中可以正常工作,但在 IE 中却不行。它在控制台中打印“文档准备就绪”,但“footer_config”DIV 为空。如果我在 IE 中按 CTRL+F5 它可以工作,并且 div 具有 XML 文件的内容。我使用的是 IE 9。
有什么想法吗?
提前致谢!
【问题讨论】:
-
你试过没有console.log吗?
-
是的,一开始它没有console.log,我把它放在那里检查$(document).ready是否正在执行。
标签: javascript jquery xml load internet-explorer-9