Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)?

前端 未结 12 2520
无人及你
无人及你 2020-11-21 04:37

Assuming a URL of:

www.example.com/?val=1#part2

PHP can read the request variables val1 using the GET array.

Is the ha

12条回答
  •  一向
    一向 (楼主)
    2020-11-21 05:06

    The answer is no.

    The main purpose of the hash is to scroll to a certain part of the page where you have defined a bookmark. e.g. Scroll to this Part when page loads.

    The browse will scroll such that this line is the first visible content in the page, depending on how much content follows below the line.

    Yes javascript can acces it, and then a simple ajax call will do the magic

提交回复
热议问题