我对URL的一般形式的理解是它看起来如下:
<scheme>://<host><path>?<query>#<fragment>
Run Code Online (Sandbox Code Playgroud)
查询或片段中是否可以有正斜杠?更一般地说,是否有任何专门为URL的任何部分保留的字符?
suh*_*lvs -1
当然你可以/
同时使用fragment
和query
一个例子:
<a href='#vol/p'>hash example</a>
<div style='min-height:500px;'></div>
<div id='vol/p'>
<a href='http://jsfiddle.net/echo/jsonp?weep/sho/sdf=help'>get example</a>
</div>
Run Code Online (Sandbox Code Playgroud)
基本上,您可以使用任何可以在 URL 中编码的内容。 更多信息