1 Pojo
var bankName = $('#bankName_a').val().trim();
var realName = $('#realName_a').val().trim();
var bankIdcard = $('#bankIdcard_a').val().trim();
var bankNumber = $('#bankNumber_a').val().trim();
var bankNameZhi = $('#bankNameZhi_a').val().trim();
var bankPhone = $('#bankPhone_a').val().trim();
//进行验证
//将数据封装成json
var json={};
json['userId'] = ${existUser.id};
json['hotelId'] = ${existUser.hotelId};
json['bankName'] = bankName;
json['realName'] = realName;
json['bankIdcard'] = bankIdcard;
json['bankNumber'] = bankNumber;
json['bankNameZhi'] = bankNameZhi;
json['bankPhone'] = bankPhone;
2 包装Pojo
2.1 Ajax
2.2 包装类
3 Map
模型驱动,接受的json参数自动被map,model,modelAndView自动解析
注意接受参数的对应关系