直接上例子
var student = new Object();
student.name = "Lanny";
student.age = "25";
student.location = "China";
var json = JSON.stringify(student);
alert(student);
输出:{‘name‘:'Lanny','age':25,location:'China'}
直接上例子
var student = new Object();
student.name = "Lanny";
student.age = "25";
student.location = "China";
var json = JSON.stringify(student);
alert(student);
输出:{‘name‘:'Lanny','age':25,location:'China'}