Attaching hashtag to URL with javascript

Cœuralooficha提出了一个问题:Attaching hashtag to URL with javascript,或许与您遇到的问题类似。

回答者CMS给出了该问题的处理方式:

You can change the location.hash property, it will change the current anchor identifier without navigating away form the page, for example you could:

-- ----------------------------- --------- -------------------------
-- ----------------------------- --------- -------------------------

Then:

----------------------------- --- -
  ------------- - -------- -- --- --- ------- ---- --
  ------------------- -- ------ ----------

  -- --- ------- ---- -------
----

希望本文对你有帮助,欢迎支持JavaScript中文网

来源:JavaScript中文网 ,转载请注明来源 本文地址:https://www.javascriptcn.com/post/28561