Area.hostname : Area : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » Area »

 

Area.hostname










Syntax








document.links[num].hostname



The hostname property contains just the hostname that is specified in the URL.

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="java2sMap">
      <area name="car1"
            coords="1,1,48,48"
            href="http://www.navioo.com"
            target="_top">
      <area name="car2"
            coords="51,1,99,49"
            href="http://www.navioo.com"
            target="_top">
    </map>
    <img src="http://www.navioo.com/style/logo.png" align="top" height="50"   width="100" usemap="#java2sMap">
    <hr>
    <script language="JavaScript">
    <!--
    function updateLinks(site)
    {
      if(site=="US")
      {
        document.links[0].hostname="www.navioo.com";

        document.links[1].hostname=document.links[0].hostname;
      }
      if(site=="EUROPE")
      {
        document.links[0].hostname="www.navioo.com";
        document.links[1].hostname=document.links[0].hostname;
      }
    }
    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» Area