jquery encoding

客户端:
$.ajax({
url:'${logStatisticByType}',
data:{"ids":encodeURI(ids)},
type:"get",
success:function(){alert("xxx");}
});
在服务端:
String ids = CommonManage.getParam("ids");
try {
ids = java.net.URLDecoder.decode(ids, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}

你可能感兴趣的:(js)