Creating Rollovers
Creating More Effective Rollovers
Building Three-State Rollovers
Triggering Rollovers from a Link
Making Multiple Links Change a Single Rollover
Working with Multiple Rollovers
Creating Cycling Banners
Adding Links to Cycling Banners
Building Wraparound Slideshows
Displaying a Random Image
Cycling Images with a Random Start
To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.
See it run: Displaying a Random Image
This simple HTML creates the page for a random image.
You can display random images on your page with this script, which use JavaScript's Math.random method to generate a random number.