js 如何通过json向后台传递数组
1个回答
展开全部
var students = [];
students[students.length] = new Object();
students[students.length] .name = "Lanny";
students[students.length] .age = "25";
students[students.length] .location = "China";
var json = JSON.stringify(students);
var student = new Object();
student.name = "Lanny";
student.age = "25";
student.location = "China";
students = (students || []).push(student);
var json = JSON.stringify(students);
students[students.length] = new Object();
students[students.length] .name = "Lanny";
students[students.length] .age = "25";
students[students.length] .location = "China";
var json = JSON.stringify(students);
var student = new Object();
student.name = "Lanny";
student.age = "25";
student.location = "China";
students = (students || []).push(student);
var json = JSON.stringify(students);
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询