During debugging, you often need to know the content of the json object. Using the JSON. stringify function, you can convert the json object into a string. [Javascript] $ (document ). ready (function () {$. ajax ({type: & quot; post & quot;, dataType: & quot; json & quot;, url: &
During debugging, you often need to know the content of the json object. Using the JSON. stringify function, you can convert the json object into a string.
[Javascript]
$ (Document). ready (function (){
$. Ajax ({
Type: "post ",
DataType: "json ",
Url: '/centermanage/modules/admin/index. php? Task = getequipmentinfo ',
Data: "& id =" + id,
Error: function (msg ){
alert(JSON.stringify(msg));
},
success: function(msg) {
alert(JSON.stringify(msg));
})
})
$ (Document). ready (function (){
$. Ajax ({
Type: "post ",
DataType: "json ",
Url: '/centermanage/modules/admin/index. php? Task = getequipmentinfo ',
Data: "& id =" + id,
Error: function (msg) {[javascript] view plaincopyprint? Alert (JSON. stringify (msg);}, success: function (msg) {alert (JSON. stringify (msg);}) alert (JSON. stringify (msg ));
},
Success: function (msg ){
Alert (JSON. stringify (msg ));
})
})
Share: