1. JSON转字符串
var jsonStr = {"name": "xiaoming", "sex": "男"}
JSON.stringify(jsonStr)
2. 数组转字符串
var arr= ["A", "B", "C", "D"];
var str = arr.toString(); // Returns a string representing the specified object.
var str1 = arr.join() // Joins all elements of an array into a string.
var str2 = arr.join(","); // 给每个元素之间加入 "," 隔开,并转字符串