Home >Backend Development >PHP Tutorial >Like segmentfault.com/faq#q8, the content after '#' is not only positioned at a location, but also performs certain operations. How is it achieved?
For example, [http://loadpage.b0.upaiyun.com/#http://www.baidu.com] (the brackets are a complete address)
Accessing this page will redirect you Go to the URL after "#".
Can the content after "#" be obtained? Should I use js to get it on the front end or on the server side?
For example, [http://loadpage.b0.upaiyun.com/#http://www.baidu.com] (the brackets are a complete address)
Accessing this page will redirect you Go to the URL after "#".
Can the content after "#" be obtained? Should I use js to get it on the front end or on the server side?
Using location.hash
in js is #
and the content after it.
As follows, assuming your file name is index.html, when you visit index.html#windows.com, you will be redirected to windows.com