我前台获取到一个字符串 111111#\n22222
在后台获取的时候 #和#号后面的都没有了。。
用的是location.href="xx.html?xxx="+encodeURI(encodeURI(xxx));
但是传 类似 111111.*.*\n22222 后台获取正常。。。
关于ssm框架中jsp往后台传值的问题
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- xhl_2017 2017-06-08 03:40关注
1,#是特殊字符,使用location.href="xx.html?xxx="+encodeURI(encodeURI(xxx));会被截断
2,使用encodeURIComponent可以避免本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 1