Use native JSON objects to convert objects into strings
var jsObj = {};jsObj.testArray = [1,2,3,4,5];jsObj.name = 'CSS3';jsObj.date = '8 May, 2011';var str = JSON.stringify(jsObj);alert(str);Convert from JSON string to object
var jsObj = {};jsObj.testArray = [1,2,3,4,5];jsObj.name = 'CSS3';jsObj.date = '8 May, 2011';var str = JSON.stringify(jsObj);var str1 = JSON.parse(str);alert(str1);The above method of transmuting JS objects (Object) and strings (String) is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.