http://music.163.com/#/song?i... #The thing after the number is called a fragment, or it can also be called an anchor point. This thing will not refresh the browser, nor will it submit a request to the server, but it can generate a browser record. Get the value after the # number is window.location.hash So you only need to monitor the change of this hash value onhashchange
The page is actually not refreshed. You know "#target", which can jump your page to the target location. This is actually similar to this. Further, you can learn about js hash (mentioned above) and routing
http://music.163.com/#/song?i...
#
The thing after the number is called a fragment, or it can also be called an anchor point. This thing will not refresh the browser, nor will it submit a request to the server, but it can generate a browser record.Get the value after the # number is window.location.hash
So you only need to monitor the change of this hash value onhashchange
window.location.hash
iframe
In fact, I just used Event.preventDefault
The page is actually not refreshed. You know "#target", which can jump your page to the target location. This is actually similar to this. Further, you can learn about js hash (mentioned above) and routing