标签: javascript
我想做点什么
.decode()
最终会被重定向到 location.pathname = "/abc" location.search = "name=test" 。我希望重定向发生在/abc
location.pathname = "/abc" location.search = "name=test"
/abc
答案 0 :(得分:1)
只需设置location(或location.href):
location
location.href
location = "/abc?name=test";
由于它是相对URL,协议和主机将保持不变。