我已经查看了这个$.get 在我的服务器中不起作用,并且很确定我必须做一些特别的事情才能使回调触发。
问题是:我不知道那是什么。
这
$.get('myFile.html', function(data) {
alert('duh');
});
下载myFile.html但从不触发回调。为什么?我需要做什么才能使回调触发?
Chrome->开发者工具->网络
下XHR,GET表演Status 200。我什至可以看到 html 源代码Response和Preview.
$.ajaxError()
这着火了。
' https://mysite.com/myFile.html '
与没有绝对路径的结果相同:GETshows Status 200。我什至可以看到 html 源代码Response和Preview.
$.ajaxError()thrownError
alert小号SyntaxError: Unexpected token <_