开发者

PHP get anchor attribute [duplicate]

开发者 https://www.devze.com 2023-03-10 05:24 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to get the value after the hash in “somepage.php#name”?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to get the value after the hash in “somepage.php#name”?

Is it possible to get an anchor name with PHP?

For example, for this URL:

http://domain.com/#departments

How can I get the text "departmen开发者_开发技巧ts"?


There is no way to get things after "#" in php, because this data is not provided to server, only url without data after "#", but if you are executing php script through JavaScript, you can Always split url into "#" and send the data as parameter or value of some hidden field.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号