Metachecker.net
|
TrafficChecker.net
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Random Background Image
[View Sample]
A script that displays a random background image each time the document is loaded, out of three.
Insert into <HEAD>
Insert into <BODY>
<script> /*Random Background Image- By (www.wsabstract.com) More free JavaScripts here! */ var backgr1="../clip/backgr4.jpg" var backgr2="../clip/backgr17.jpg" var backgr3="../clip/backgr13.jpg" var cur=Math.round(6*Math.random()) if (cur<=1) backgr=backgr1 else if (cur<=4) backgr=backgr2 else backgr=backgr3 document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">') </script>
Other Options
Directions: Insert the below IN PLACE of the <body> tags (the code dynamically generates it). Change backgr1, backgr1, and backgr3 to reflect the path of the three background images you're using.