gpt4 book ai didi

http - 从后面的代码访问跳转链接(哈希字符 # 之后的 URL 部分)

转载 作者:可可西里 更新时间:2023-11-01 16:26:11 26 4
gpt4 key购买 nike

有人知道是否可以在 C# 代码中访问跳转链接的名称吗?

我正在做一些 url 重写的事情,我想我可能看不到 URL 的那部分。

基本上,我的 URL 看起来有点像这样:

http://www.mysite.com/Terms.aspx#Term1

我想访问“Term1”。我在 ServerVariables 中看不到它...

有什么想法吗?!?!?

谢谢!

最佳答案

散列字符用于客户端导航。 # 之后的任何内容都不会提交给服务器。

来自wikipedia article :

The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server. When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment.

它的技术名称是Fragment Identifier

关于http - 从后面的代码访问跳转链接(哈希字符 # 之后的 URL 部分),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/825087/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com