WebSiteMadeEasy.net
|
FontsMadeEasy.com
|
RankChecker.net
Google Search:
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
Advance 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 Images
[View Sample]
As an alternative to background colors and random background colors, JavaScript allows you to have random background images. Just take a look at the background of this page then hit reload. Notice anything? Ah, chalk another one up to JavaScript.
Insert into <HEAD>
<SCRIPT LANGUAGE="JavaScript"> <!-- Original: Tim Wallace today=new Date(); jran=today.getTime(); var number = 7; var random_number=""; var image=""; var text_color=""; ia=9301; ic=49297; im=233280; jran = (jran*ia+ic) % im; random_number = Math.ceil( (jran/(im*1.0)) *number); // Loads the appropriate image and text color based on random number. if (random_number==1) { text_color="000000"; image="paper.gif"; } if (random_number==2) { text_color="000000"; image="wood.gif"; } if (random_number==3) { text_color="000000"; image="clouds.gif"; } if (random_number==4) { text_color="000000"; image="faces.gif"; } if (random_number==5) { text_color="000000"; image="marble.gif"; } if (random_number==6) { text_color="000000"; image="question.gif"; } if (random_number==7) { text_color="000000"; image="plain.gif"; } // End --> </SCRIPT>
Insert into <BODY>
<!-- STEP TWO: Add this onLoad event handler to the BODY tag --> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin document.open(); document.write("<BODY BACKGROUND='"+image+"' TEXT='"+text_color+"'>"); document.write("<CENTER></CENTER>"); // End --> </SCRIPT> <!-- STEP THREE: Place this script in the BODY of the HTML document --> <BODY> <FORM> <INPUT TYPE="button" VALUE="Reload Page" onClick="window.location='r-images.html'"> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin document.write("<CENTER>Background Image: <FONT SIZE=-1>("+image+")</FONT></CENTER>"); // End --> </SCRIPT>
Other Options