我有一个简单的ajax请求,该请求适用于所有现代浏览器,但IE9(当然)。在IE9中,响应返回为200,触发成功函数,但没有返回数据。
这是js:
function getMapPins(section){
$('.spinnerBG').fadeIn('fast');
$.ajax({
type: 'POST',
url: '/ourprojects_ajax.html',
data: {'map_section':section},
cache:false,
success: function(data){
//alert(data);
$('#mapPins').append(data);
createPins(section);
}
});
}
并确保它不是PHP:
<?php echo '<p>why won't this damn thing work in IE9</p>'; ?>
有任何想法吗?
最佳答案
似乎有一个PARSE ERROR:
<?php echo '<p>why won't this damn thing work in IE9</p>'; ?>
应该:
<?php echo '<p>why won\'t this damn thing work in IE9</p>'; ?>
如果您关闭了错误,那么您将不会得到任何答复,因为该页面将为空白。
关于php - IE9 Ajax成功,但没有响应正文,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13500497/