我做了一个简单的帖子调用,如下所示:
$.post("myPage.php", '', function(raw_data, textStatus, jqXHR) {
alert("in success");
});
但是 IE (7/8/9) 中永远不会调用 alert
。在 myPage.php
中,我的内容类型是 text/html
。 IE 有什么问题?
最佳答案
$(document).ready(function () {
$.post("myPage.php", '', function(raw_data, textStatus, jqXHR) {
alert("in success");
});
});
webkit 和 gecko 浏览器引擎(不幸的是)在让你在 DOM 准备好之前做一些事情方面比 IE 宽容得多。
阅读:
关于jquery - 为什么 $.post 方法在 IE 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9315955/