0

I am developing an app for a company i work for but this ajax call only works on IE9+, FF, Chrome . I've been reading around without much luck. Here is the code i have.It is pretty simple:

var request_getShoppingCart = $.ajax({
    url:"classes/sCart.php?action=getItems",
    cache: false,

});
request_getShoppingCart.done(function(Data) {
    $('#shoppingCart').html(Data);
});

Any help is appreciated

4

1 回答 1

4

IE 失败并显示trailing comma.

var request_getShoppingCart = $.ajax({
    url:"classes/sCart.php?action=getItems",
    cache: false //remove comma here

});
request_getShoppingCart.done(function(Data) {
    $('#shoppingCart').html(Data);
});


另请阅读

IE7 和 IE6 中的 jQuery .ajax 方法不起作用,但在 Firefox 中工作正常

Internet Explorer 9 是否会在数组和对象文字末尾的额外逗号上阻塞?

于 2013-11-05T14:32:23.693 回答