迷茫2017-06-13 09:26:20
The principle is that the modification of the hash will not cause the browser to refresh. This is the most fundamental reason. If there are other attributes modified on the URL, it will not cause a refresh. It can also be used for routing. It’s that simple
大家讲道理2017-06-13 09:26:20
This is originally the anchor information within the page, used for jumping within the page, such as Baidu Encyclopedia. The content behind the link description
# represents the id of the anchor point. When this information exists, it will jump to the anchor point specified on the page. If you look at the Dom structure, you can see the following
ps://wapbaike.baidu.com/item/http/243074?adapt=1&fr=aladdin#u0
PHP中文网2017-06-13 09:26:20
The advantage of this is that it can implement front-end routing, refer to /a/11... As for why it can be achieved, it is because the internal design of the browser is like this. Modify the hash and the browser will not jump.