• Nike free run 2 pink
  • Nike free 5.0 kids
  • Oakley sunglasses discount
  • CodeAve.com CodeAve.com - JavaScript - Misc
    ASP
    JavaScript
    ·Document Info
    ·Forms
    ·Images
    ·Miscellaneous
    ·Navigation
    ·Script Writers
    ·Contents
    ·What's New?
    CSS
    HTML
    Maps
    Links
    Mail List
    Search
    Sitemap


     

  • Retro 3 jordans
  • Jordan 13 retro
  • Nike free 5.0

  • Random Hyperlinked Images (IE)
  • Air jordan 11 low
  • New Balance 996
  • Ray ban vintage sunglasses
  • Hyperlinking random images is an quick and easy way to make a page look unique from others in the same template and enables you to highlight specific places within your website (or others) you want to drive traffic to. The following example contains links to five of the most popular search engines and their logos. Each time the page is refreshed the script will select a random number from one to five and dynamically write the appropriate image and hyperlink to the browser.
    View the Output
    Text View
    Print View
    Mail this Link
    Download the Code

    <html>
    <title>CodeAve.com(JavaScript: Random Hyperlinked Images)</title>
    <body bgcolor="#FFFFFF">
    <center>

    <script language="JavaScript">
    <!--
    // Create arrays to contain all the values
    // for links and image locations
    link = new Array
    image = new Array

    link[1]="http://www.yahoo.com"
    image[1]="http://us.yimg.com/images/yahoo.gif"

    link[2]="http://www.excite.com"
    image[2]="http://www.excite.com/mesp/images/excite/new_logo-180.gif"

    link[3]="http://www.lycos.com"
    image[3]="http://a284.g.akamai.net/7/284/987/000/lygo.com/ly/i/lyguide.gif"

    link[4]="http://www.cnet.com"
    image[4]="http://cnet.com/Images/Headers/cnet-1-title.gif"

    link[5]="http://www.webcrawler.com"
    image[5]="http://webcrawler.com/img/web/hdr/home_header.gif"


    // Create a random number between 1 and five
    random_num = (Math.round((Math.random()*4)+1))


    // Write a link and images with random array
    document.write("<a href=\"" + link[random_num] + "\">");
    document.write("<img src=\"" + image[random_num] + "\" border=\"0\"></a>");

    -->
    </script>

    </center>

    </body>
    </html>

     

     

     



    ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
    Server Variables | Response Objects | Random Events | Miscellaneous
    HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
    JavaScript: Document Info | Forms | Images | Navigation | Script Writers
    CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

    jordan 11 gamma Nike KD VI lebron 11 low