标签: jquery
如果我尝试运行window.location.href = "www.example.com",重定向工作正常。如果我尝试运行window.location.href = "localhost:8000/example",则没有任何反应。我该如何解决这个问题?
window.location.href = "www.example.com"
window.location.href = "localhost:8000/example"
编辑:此重定向位于AJAX成功回调中,如果这有任何区别的话。
答案 0 :(得分:0)
尝试window.location.href = "//localhost:8000"
window.location.href = "//localhost:8000"