Mega Code Archive

 
Categories / JavaScript Tutorial / HTML Tags
 

Area host

Syntax document.links[num].host The host property contains the hostname and port that is specified in the URL and separated with a colon (:). This property is a read/write string. <html>     <body>     <form name="question">     <input name="site"            type="radio"            checked            onClick="updateLinks('US')">US<br>     <input name="site"            type="radio"            onClick="updateLinks('EUROPE')">Europe     </form>     <MAP name="rntsoftMap">       <area name="car1"             coords="1,1,48,48"             href="http://www.rntsoft.com"             target="_top">       <area name="car2"             coords="51,1,99,49"             href="http://www.rntsoft.com"             target="_top">     </map>     <img src="http://www.rntsoft.com/style/logo.png" align="top" height="50"   width="100" usemap="#rntsoftMap">     <hr>     <script language="JavaScript">     <!--     function updateLinks(site)     {       if(site=="US") {         document.links[0].host="www.rntsoft.com";         document.links[1].host=document.links[0].host;       }       if(site=="EUROPE") {         document.links[0].host="www.rntsoft.com:7412";         document.links[1].host=document.links[0].host;       }     }     -->     </script>     </body>     </html>