Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 将URL返回值记录到firebug控制台_Javascript_Model View Controller_Firebug - Fatal编程技术网

Javascript 将URL返回值记录到firebug控制台

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

我目前正在用firebug调试一个应用程序,我想查看我的URL返回的json/XML值。 我使用的是MVC结构,因此与

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()
},
打开“网络”选项卡,打开请求,然后打开“响应”选项卡