码迷,mamicode.com
首页 > Web开发 > 详细

AJAX 向后台发送带 List 集合的对象(转)

时间:2019-06-02 19:23:13      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:url   使用   http   tab   func   www   htm   插件   taint   

var school = {};
school.name = ‘清华大学‘;
school.address = "北京";
//此处使用的是 easyui 插件来获取数据
var rows = $(‘#maintainTableId‘).datagrid(‘getSelections‘);
for (var i = 0; i < rows.length; i++) {
school["students [" + i + "].name"] = rows[i].name;
school["students [" + i + "].sex"] = rows[i].sex;
}

$.ajax({
url : url,
type : ‘POST‘,
dataType : ‘json‘,
data : school,
success : function() {}
})

参考原文https://www.cnblogs.com/guofz/p/8849093.html

AJAX 向后台发送带 List 集合的对象(转)

标签:url   使用   http   tab   func   www   htm   插件   taint   

原文地址:https://www.cnblogs.com/aishangyizhihu/p/10963937.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!