参数转义两次
location.href = "cMGridController.do?submenu&id=" + id + "&functionName=" +
encodeURI(encodeURI(name)) ;
后台接收
String functionNameTwo =
URLDecoder.decode(functionName, "UTF-8");
本文介绍了前端如何通过两次转义参数来确保URL的安全性,同时展示了后台如何对接收到的参数进行解码处理。
参数转义两次
location.href = "cMGridController.do?submenu&id=" + id + "&functionName=" +
encodeURI(encodeURI(name)) ;
后台接收
String functionNameTwo =
URLDecoder.decode(functionName, "UTF-8");
3230

被折叠的 条评论
为什么被折叠?