Saturday, October 24, 2009

Refreshing and changing web sight Picture?

I have two questions:



How do you have a picture on your websight that changes everytime you refresh the webpage. (to different images)



And



what is the best, most storage, ect Free web sight hosting with NO ads...besides googlepages, zoomshare and 50webs.



thks.



Refreshing and changing web sight Picture?





1. With a script.



2. Googlepages



Refreshing and changing web sight Picture?



Q1: My webpage does it as follows...



%26lt;script language=%26quot;JavaScript%26quot;%26gt;



random_num = (Math.round((Math.random()*10)))



document.write(%26#039;%26lt;img src=%26quot;xxxx%26#039; + random_num + %26#039;.jpg%26quot; border=%26quot;0%26quot;%26gt;%26#039;);



%26lt;/script%26gt;



you need to name your image files xxxx1 xxxx2 xxxx3 etc... up to xxxx10



or change the 10 to a higher (or lower) number in the script if you want more (or less) images.



Obviously xxxx can also be changed to a more descriptive word!



hope this helps



Q2: Depends on what you want. My local hack-lab runs free web hosting, all you pay for is the domain name, and the hosting is free!

No comments:

Post a Comment

Blog Archive