Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每个人,如果我们想像这样在 url 中获取参数
/node/x/y we use arg(1) -> get x and arg(2) -> get y but if i have a url like that /node/x/y#abc
我如何abc在drupal中获取参数非常感谢
abc
从服务器端,您无法获取标志之后的 URL 部分#或#标志本身。
#
浏览器在登录后不会向#服务器发送任何导致页面加载的内容。这就是为什么您#在许多 Ajax 应用程序的 URL 中看到的原因(尽管 HTML5 可以更改完整的 URL)。
如果您仍然需要根据哈希标记显示不同的内容,则必须添加一些 Ajax 以通过 JavaScript 向服务器发出第二个请求。