javascript - How does the page get the redirected url?
滿天的星座2017-07-03 11:42:39
0
1
1020
I recently encountered a problem, window.location.href='url', and then I found that the url redirected to another address. Can I prevent the execution of window.location.href? I only need to get the redirection. Then the parameters in the url.
Page switching will trigger
window.onunload
You can just stop it insideAt the same time, your new
url
is a value assigned in your code, there is no such thing as acquisition. You know your code itself, right?