用encodeURIComponent方法,把路徑放在裏面,能夠防止斜槓被取消。code
如下attachfiles是個人一個文件的絕對路徑。io
window.location.href="${pageContext.request.contextPath}/competionFlow/attachfile?attachfiles="+encodeURIComponent(attachfiles);file