[JavaScript] Picture Per Refesh

Discussion in 'Web Programming' started by s0wh4t, Dec 15, 2009.

[JavaScript] Picture Per Refesh
  1. Unread #1 - Dec 15, 2009 at 1:47 PM
  2. s0wh4t
    Joined:
    Dec 13, 2009
    Posts:
    76
    Referrals:
    0
    Sythe Gold:
    0

    s0wh4t Member

    [JavaScript] Picture Per Refesh

    This script changes picture on every refesh.
    Save Pictures as:
    Picture0.png
    Picture1.png
    Picture2.png
    Picture3.png
    Picture4.png

    Or just change it.
    PHP:
    <html>
                    <
    script type="text/Javascript">
                        var 
    randomNumber=Math.floor(Math.random()*5);
                        var 
    imagePath "/stiil/Vahvel/";
                        var 
    theAdimagePath+"Picture"+randomNumber+".png";
                        
    document.write("<img src=\""+theAd+"\" />");
                    
    </script>    
    </html>
    Any problems, feel free to ask.
     
< Falling Snowflakes with images | Statistic Signatures. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site