4
IE8支持財產或SCRIPT438:對象不支持屬性或方法 '的forEach'
$('.tabs').tabs();
$('#search-consumables [data-ajax-call]').change(function() {
var $this = $(this),
settings = $this.data(),
$target = $(settings.target);
$.ajax({
type: 'GET',
url: 'index.php?route=module/quicklookup/' + settings.ajaxCall,
data: $this.closest('form').serializeArray(),
dataType: 'json',
success: function(data) {
var html = '';
$target.find(':not(.blank)').remove();
html = $target.html();
data.forEach(function(entry) {
html += '<option value="'+entry.id+'">'+entry.name+'</option>';
});
$target.html(html);
}
});
});
我已經試過
$.each(data, function(entry) {
但數據然後返回未定義的方法 '的forEach',我是什麼想要在IE8中工作?
'data'是類型'object'它沒有方法'的foreach()' – jmoerdyk 2013-04-05 21:29:24