PHP中文网2017-06-08 11:03:44
"#" adds parameters to the url in the non-refresh state. You can add any parameters after #
Commonly used in front-end, such as window.location.hash
習慣沉默2017-06-08 11:03:44
Generally, single-page applications need to maintain a URL at all times, but they need to switch application status in different business scenarios. At this time, hash is used, which can switch status but will not refresh again. In addition, you can also refer to this article by Teacher Ruan Yifeng Let’s have a deeper understanding of this article about hash http://www.ruanyifeng.com/blo...
習慣沉默2017-06-08 11:03:44
In the fragment definition of URL, the characters after # will not be sent to the server, but are used by the browser itself, so many js use the string after # as the URL in a single page.
三叔2017-06-08 11:03:44
First of all, # is followed by a large hash value. Although the page is not refreshed, the browser will record it so that you can move forward or backward, especially when making a single page, such as some router routing processing and detecting changes in the URL. window.location.hash