var student = new Object(); student.name = "Lanny"; student.age = "25"; student.location = "China"; var json = JSON.stringify(student); alert(json); alert(student);
我们不用这个函数,而直接alert(student),结果如下:
var student = new Object(); student.name = "Lanny"; student.age = "25"; student.location = "China"; var json = JSON.stringify(student); alert(json); alert(student);
我们不用这个函数,而直接alert(student),结果如下: