js資料型態:
字串、數字、布林、陣列、物件、Null、Undefined
js Object
var data = { "name":"yfs", "age":28, "boy":true, "language":["chinese", "english"], "address":{ "provice":"shanxi", "city":"xian" } };
JSON.stringify();
var jsonString = JSON.stringify(data); console.log(jsonString); console.log(typeof(jsonString));//结果: {"name":"yfs","age":28,"boy":true,"language":["chinese","english"],"address":{"p rovice":"shanxi","city":"xian"}}//类型:stringvar a = '{"name":"yfs","age":28,"boy":true,"language":["chinese","english"],"address":{"p rovice":"shanxi","city":"xian"}}';
JJ.