jquery $.getJSON 乱码

yigeng 2012-04-04

页面处理

var hotelCode =encodeURI($("#hotelCode").val(),"utf-8");

var hotelName = encodeURI($("#hotelName").val(),"utf-8");

后台处理

Hotel hotel = new Hotel();

hotel.setHotelName(URLDecoder.decode(hotelName,"utf-8"));

hotel.setHotelCode(URLDecoder.decode(hotelCode,"utf-8"));