<a href="./page2.html" rel=next media="not print">next</a> How to get href values in javascript function
This way
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> body { font-family: Arial; font-size: 10pt; } </style> <script type="text/javascript"> function GetLink() { alert(document.getElementById("lnkforums").href); } </script> </head> <body> <a id="lnkforums" href="http://www.aspforums.net/Forums/">aspforums.net</a> <button id="btnGetLink" onclick="GetLink();"> Get link value </button> </body> </html>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.