1

我有一个简单的 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>'; ?>

有任何想法吗?

4

1 回答 1

6

似乎有一个解析错误:

<?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>'; ?>

如果您关闭了错误,那么您将不会得到响应,因为该页面将是空白的。

于 2012-11-21T19:21:32.607 回答