且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在服务器端语言中获取哈希?

更新时间:2023-11-27 21:30:16

简短回答:不,这只是客户端的事情.

Short answer: no, it's a client side only thing.

稍长:它被称为片段标识符,并且只是客户端——浏览器不会将那部分 url 发送到服务器.除非您使用某些浏览器实现(或软件),否则它在任何语言中都是不可能的, 会将 url 的那部分发送到服务器.参考:http://en.wikipedia.org/wiki/Fragment_identifier

Slightly longer: It's called Fragment identifier and is client side only - browser doesn't send that part of the url to the server. It's not possible in any language unless you are using some browser implementation (or software) which would send that part of url to the server. Reference: http://en.wikipedia.org/wiki/Fragment_identifier