The pathname property represents the pathname portion of the link URL.
<html> <head> <title> Using the pathname property of the Link object</title> </head> <body> <script language="JavaScript"> <!-- function showpathname(){ alert(document.links[0].pathname); } --> </script> Click the button to see the pathname for the URL <form name="form1"> <a href=http://www.navioo.com> http://www.navioo.com</a> <br><br> <input type="button" name="path" value="Get Pathname Value" onClick='showpathname()'> <br> </form> </body> </html>