打印json对象的内容及JSON.stringify函数应用

时间:2013-03-29    点击:386   
在调试的时候,经常需要知道json对象的内容,通过JSON.stringify函数,可以转换json对象为字符串。
复制代码 代码如下:

$(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>
jQuery页面图片伴随滚动条逐渐显示的小例子
js 验证密码强弱的小例子
javascript中日期转换成时间戳的小例子
原生js拖拽(第一课 未兼容)拖拽思路
hover的用法及live的用法介绍(鼠标悬停效果)
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved