我想将用户重定向到url“/some/link+with+garbage/”。当我使用
window.location.href="/some/link+with+garbage/"
时,我被重定向到“/some/link%2Bwith%2Bgarbage/”,这个操作失败了。
是否有方法防止window.location.href
对url进行编码?
document.location.href="/some+thing/summary"
,我会被发送到页面"/some%2Bthing/summary"。有什么解决方法吗? - a_bigbadwolf