var obj = {}; obj=new Array; obj.name='小王'; obj.sex='男'; var str=JSON.string(obj) 转载于:https://www.cnblogs.com/xuelishuyue/p/7019051.html