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
Get Random-Background-Colors onDoublelick
[View Sample]
Insert into <HEAD>
<script> <!-- Beginning of JavaScript - // CREDITS: // Random-Background-Color onDoublelick by Urs Dudli and Peter Gehrig // Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at http://www.24fun.ch. // info@24fun.ch // 2/3/2000 // IMPORTANT: // If you add this script to a script-library or script-archive // you have to add a link to http://www.24fun.ch on the webpage // where this script will be running. // INSTRUCTIONS: // Visit www.24fun.ch (scriptcenter, category background) and // download the latest version of this funscript as // ZIP-File. The full-version contains additional // instructions on configuration. function makeRandom(range) { rand=Math.floor(range*Math.random()) return rand } function makeHexa(thiscol) { var colhex_left = Math.floor(thiscol/16) var colhex_right= thiscol-(colhex_left*16) if (colhex_left == 10) {colhex_left="A"} if (colhex_left == 11) {colhex_left="B"} if (colhex_left == 12) {colhex_left="C"} if (colhex_left == 13) {colhex_left="D"} if (colhex_left == 14) {colhex_left="E"} if (colhex_left == 15) {colhex_left="F"} if (colhex_right == 10) {colhex_right="A"} if (colhex_right == 11) {colhex_right="B"} if (colhex_right == 12) {colhex_right="C"} if (colhex_right == 13) {colhex_right="D"} if (colhex_right == 14) {colhex_right="E"} if (colhex_right == 15) {colhex_right="F"} var colhex =""+colhex_left+colhex_right return colhex } function dblclick() { var redcolor=makeRandom(255) redcolor=makeHexa(redcolor) var greencolor=makeRandom(255) greencolor=makeHexa(greencolor) var bluecolor=makeRandom(255) bluecolor=makeHexa(bluecolor) document.bgColor=""+redcolor+greencolor+bluecolor } if (document.layers) { document.captureEvents(Event.ONDBLCLICK); } document.ondblclick=dblclick; // - End of JavaScript - --> </SCRIPT>
Insert into <BODY>
<STYLE> A {color:FF0000;} </STYLE> <font size="-2" face="Verdana"><b>RANDOM-BACKGROUND-COLOR ONDOUBLECLICK:</b><br> This cross-browser funscript changes the background-color whenever your visitors DOUBLECLICK somewhere on your webpage. The background-color is generated by a random-function. It works with IE4x as well as NN4.6x.<br><br>
Other Options