Mega Code Archive

 
Categories / JavaScript Tutorial / HTML Tags
 

Link search

The search property represents the query portion of the URL (if available). This includes the leading question mark (?). <html>     <head>     <title> Using the search property of the Link object</title>     </head>     <body>     <script language="JavaScript">     <!--     function showsearch(){          alert(document.links[0].search);     }     -->     </script>     Click the button to see the search portion of the URL     <form name="form1">     <a href=http://www.rntsoft.com>     http://www.rntsoft.com</a>     <br><br>     <input type="button" name="search" value="Get Search portion" onClick='showsearch()'>     <br>     </form>     </body>     </html>