我正在处理项目,我正在尝试在控制台上显示json响应,但它无法正常工作。而不是获取json对象,我在控制台上看起来很怪异的javascript程序。 这是我的代码:
var settings = {
header:{
Accept: "application/json "
},
success: function(data, textStatus, jqXHR){
console.log(data)
}
}
jQuery.ajax(settings, url);
以下是Documentaion
这是我得到的控制台显示的一部分:
<!DOCTYPE html><html data-brackets-id="1"><head data-brackets-id="2" data-bramble-start-line="2" data-bramble-start-ch="0" data-bramble-end-line="7" data-bramble-end-ch="7"><base href="https://mozillathimblelivepreview.net/bramble/production/dist/index.html?locale=en-US">
<script>
(function(global){"use strict";var parent=window.opener||window.parent;var postMessageTransport={_callbacks:null,setCallbacks:function(callbacks){this._callbacks=callbacks},connect:function(url){var self=this;parent.postMessage(JSON.stringify({type:"connect",url:global.location.href}),"*");if(self._callbacks&&self._callbacks.connect){self._callbacks.connect()}},send:function(msgStr){parent.postMessage(JSON.stringify({type:"message",message:msgStr}),"*")},enable:function(){this.connect();var self=this;window.addEventListener("message",function(event){if(self._callbacks&&self._callbacks.message){self._callbacks.message(event.data)}})}};global._Brackets_LiveDev_Transport=postMessageTransport})(this);</script>
<script>
(function(global){"use strict";var transport=global._Brackets_LiveDev_Transport;var XMLHttpRequest=global.XMLHttpRequest;if(!XMLHttpRequest){console.error("[Brackets LiveDev] XMLHttpRequest not
任何人都可以帮我弄清楚我错过了什么吗?