设置全局变量$.ajaxSettings.traditional = true;
代码示例:
text : '添加',
iconCls : 'icon-add',
handler : function() {
var orgName = $("#orgName").val();
var userList = $("#roleUserList").datagrid("getSelections")
var uids = new Array();
for(var i=0;i<userList.length;i++){
uids[i] = userList[i].uid;
}
$.ajax({
type:'post',
url:'authoritiesManagerAction!addUserToOrg.do',
dataType:"json",
data:{
"uids":uids,
"orgName":orgName
},
sussecc:function(){
alert("功能开发中。。。。。。");
}
});
}
Java后台接受:
private List<String> uids; private String orgName;
原文链接:https://www.f2er.com/ajax/166075.html