Mega Code Archive

 
Categories / JavaScript Tutorial / HTML Tags
 

Link pathname

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.rntsoft.com>     http://www.rntsoft.com</a>     <br><br>     <input type="button" name="path" value="Get Pathname Value" onClick='showpathname()'>     <br>     </form>     </body>     </html>