标签:
作用:将对象(JSON对象)转换成字符串(JSON字符串)
例子:
var person = new Object();
person.name = "zhangan";
person.age = "20";
console.info(person); // Object {name: "zhangan", age: "20"}
console.info(JSON.stringify(person)); // {"name":"zhangan","age":"20"}
应用在jQuery序列化表单为JSON对象提交Action前使用stringify 转换成JSON字符串
更多参考:stringify
作者:itmyhome
标签:
原文地址:http://blog.csdn.net/itmyhome1990/article/details/50571431