Reputation: 2751
i have a url string and i am wondering how to change the order=desc part into order=asc when Iuse a link on a page?
http://localhost/en/search?city=Paris#order=desc
when i click on a link e.g.
<a href="#">Change order</a>
the url would change into
http://localhost/en/search?city=Paris#order=asc
Upvotes: 0
Views: 328
Reputation: 45829
Simply include the fragment identifier (the part after the #
) in the link (href attribute).
<a href="#order=asc">Change order</a>
Upvotes: 2