jquer使用 $.parseJSON 使用方法
var result = $.parseJSON($.ajax({ async : false,url : '${basePath}adminclass/adminclass!adminClassList.json',dataType : 'json' }).responseText); if (result['frf_success']) { var AdminClassList = result['AdminClassList']; for (var i = 0,ilen = AdminClassList.length; i < ilen; i++) { var adminClass = []; adminClass.push(AdminClassList[i]['UUID']); adminClass.push(AdminClassList[i]['NAME']); adminClassArr.push(adminClass); } } /******* 查询班级列表 end**********/ /******* 查询课程列表 start**********/ var courseArr = []; var result = $.parseJSON($.ajax({ async : false,url : '${basePath}course/course!getCourseNameList.json',dataType : 'json' }).responseText); if (result['frf_success']) { var CourseList = result['CourseList']; for (var i = 0,ilen = CourseList.length; i < ilen; i++) { var course = []; course.push(CourseList[i]['UUID']); course.push(CourseList[i]['NAME']); courseArr.push(course); } }原文链接:https://www.f2er.com/json/289759.html