Mega Code Archive

 
Categories / JavaScript Tutorial / HTML Tags
 

Link target

The target property represents the name of the window in which the URL is to be displayed. <html>     <head>     <title> Using the target property of the Link object</title>     </head>     <body>     <script language="JavaScript">     <!--     function showtarget(){          alert(document.links[0].target);     }     -->     </script>     Click the button to see the target of the URL     <form name="form1">     <a href=http://www.rntsoft.com>     http://www.rntsoft.com</a>     <input type="button" name="tar" value="Get Target" onClick='showtarget()'>     <br>     </form>     </body>     </html>