在查询字符串中遇到问题(#Instade of?) [英] Having Problem in querystring (Have # Instade of ? )

查看:176
本文介绍了在查询字符串中遇到问题(#Instade of?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下网址



http://test.test.com/contact/HotMailContacts.aspx#access_token=Test&token_type=bearer&expires_in= 3600& scope = wl.signin





看到HotMailContacts.aspx之后有[#]我怎么能得到

1. access_token

2. token_type

3. expires_in

4.范围





请帮帮我



谢谢

I Have URL With Below

http://test.test.com/contact/HotMailContacts.aspx#access_token=Test&token_type=bearer&expires_in=3600&scope=wl.signin


See After HotMailContacts.aspx there are [#] how could i get
1. access_token
2. token_type
3. expires_in
4. scope


Please help me out

thanks

推荐答案

为什么在第一个地方使用而不是?哈希标记用于跳转到页面上的锚点(可以命名为锚点或具有id的元素),因此它没有值(名称=值对没有意义),实际上这样的URL无效。大多数客户正在剥离哈希标记背后的内容,因此您不能使用它来代替问号。 HTTP URL方案是标准化 [ ^ ],你无法避免它。
Why do you use # instead of ? on first place? Hash-mark is for jumping to an anchor on the page (which can be named anchor or an element with id), thus it has no value (name=value pairs have no meaning), actually such an URL is not valid. Most clients are stripping what's behind hash-mark, so you can't use it instead of question mark. HTTP URL scheme is standardized[^], you can't avoid it.


浏览器不传输部分到服务器,所以你需要在客户端处理它。

见这里: http://stackoverflow.com/questions/317760/how-to-get-url-hash-from-server-side [ ^ ]
The browser does not transmit that part to the Server, so you need to handle it at the client end.
See here: http://stackoverflow.com/questions/317760/how-to-get-url-hash-from-server-side[^]


这篇关于在查询字符串中遇到问题(#Instade of?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆