加载中...
加载中...
JS中用encodeURIComponent编码,后台JAVA怎么解码

JS中用encodeURIComponent编码,后台JAVA怎么解码 转载

JS中用encodeURIComponent编码两次

var p = {};

p.Map = [{f : 'customNo', t : '客户编号'},{f : 'customName', t : '客户名称'}];

var param = JSON.stringify(p);

var url = "http://localhost:8080?data=" + encodeURIComponent(encodeURIComponent(param))

window.open(ulr);

JAVA中解码

String data = request.getParameter("data");

data = java.net.URLDecoder.decode(data, "UTF-8");

https://blog.csdn.net/csdnluolei/article/details/84973847


没有更多推荐了 [去首页]
image
文章
376
原创
293
转载
83
翻译
0
访问量
183411
喜欢
73
粉丝
5
码龄
7年
资源
3

文章目录

加载中...
0
0