How to hide anchor tag from URL

后端 未结 1 1067
后悔当初
后悔当初 2021-01-24 23:49

How can I hide the hash value from the following link href in the address bar?


So it\'ll redirect me to a

相关标签:
1条回答
  • 2021-01-25 00:28

    You can use a Javascript onclick event. The browser will still show index.php, but the onclick event will trigger first, and redirect the browser to the right page.

    <a href="index.php" onclick="location.redirect('index.php#dev');">
    
    0 讨论(0)
提交回复
热议问题