Get anchor from URI

后端 未结 3 1538
野的像风
野的像风 2020-12-02 01:43

I\'m writing a JSP/Servlet and I\'m trying to get the the anchor part of the URI e.g:

blabla.rdf#mark

How do I get my mark from my request?

3条回答
  •  旧巷少年郎
    2020-12-02 02:32

    This solution would only work after a submit button has been pushed, but: you could use javascript to place a hidden value on your form that is set to the value of document.location. That would tell you exactly what the browser is seeing as your address.

提交回复
热议问题