-1
这是我的代码。结果是正确的,并在Chrome和Firefox中工作,但在Internet Explorer中,我变成了beforesend行中的此错误(':'预期)。这个错误会阻止我的脚本。我尝试了一个onload函数document.onload和window.onload,但它不修复这个问题。jQuery.ajax beforeSend错误IE11
jQuery.ajax({
url: '/test',
beforeSend(xhr){
},
success: function (data, textStatus){
$('#test2').html(data);
},
async: true
});
:function'在那里。 –
使用与“成功”处理程序相同的格式。 –