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) {<PRE class = javascript name = "code"> alert (JSON. stringify (msg ));
},
Success: function (msg ){
Alert (JSON. stringify (msg ));
})
}) </PRE> <P> </P>
<PRE> </PRE>
<BR>
<P> </P>
$ (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: