Javascript 将URL返回值记录到firebug控制台
我目前正在用firebug调试一个应用程序,我想查看我的URL返回的json/XML值。 我使用的是MVC结构,因此与Javascript 将URL返回值记录到firebug控制台,javascript,model-view-controller,firebug,Javascript,Model View Controller,Firebug,我目前正在用firebug调试一个应用程序,我想查看我的URL返回的json/XML值。 我使用的是MVC结构,因此与 jQuery("#list1").jqGrid({ url:'http://localhost/Zend/jqueryapp/public/artist/index', datatype: "json", mtype: 'GET', //console.log("http://localhost/Zen
jQuery("#list1").jqGrid({
url:'http://localhost/Zend/jqueryapp/public/artist/index',
datatype: "json",
mtype: 'GET',
//console.log("http://localhost/Zend/jqueryapp/public/artist/index"),
console.log
位是挑战
如何破解此问题?您可以通过在Firebug的“网络”选项卡下展开请求来查看响应,而无需任何额外工作 如果您不想在调试时深入了解这些,并且只想立即输出值,那么可以在请求之后将日志记录放在回调中 比如:
jQuery("#list1").jqGrid({
url:'http://localhost/Zend/jqueryapp/public/artist/index',
datatype: "json",
mtype: 'GET',
loadComplete: function(xhr) {
//get values to log from xhr
//console.log()
},
打开“网络”选项卡,打开请求,然后打开“响应”选项卡