//js對象 var user = { "name": "張學友", "address": "中國香港" }; //將對象轉換成字符 var str = JSON.stringify(user); alert(str); //將字符串轉換成json對象 var zxy = JSON.parse(str); alert(zxy.name + "," + zxy.address);轉http://www.javashuo.com/article/p-tepbeyuy-w.html