前台:var areaname = encodeURI(encodeURI(name))
后台:areaname = URLDecoder.decode(areaname,“UTF-8”);
这样问题就解决了
本文探讨了在前端使用双重encodeURI对变量进行编码的方法,以及在后台通过URLDecoder.decode进行解码的解决方案,确保了跨平台数据传输的正确性。
前台:var areaname = encodeURI(encodeURI(name))
后台:areaname = URLDecoder.decode(areaname,“UTF-8”);
这样问题就解决了

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