URL中包含url参数,(文件路径作为参数)
时间:2019-04-20 11:56:31
收藏:0
阅读:564
用encodeURIComponent方法,把路径放在里面,可以防止斜杠被取消。
以下attachfiles是我的一个文件的绝对路径。
window.location.href="${pageContext.request.contextPath}/competionFlow/attachfile?attachfiles="+encodeURIComponent(attachfiles);
原文:https://www.cnblogs.com/ly-520/p/10739943.html
评论(0)