JavaScript Source Code 3000: BG Effects: Image BG Changer
Image BG Changer
(Internet Explorer Only) Changes the page's background to each of the images on the page as you touch them. The background returns to white when you move your cursor off the image.
bg-changer.zip
JavaScript Source Code 3000: BG Effects: Image BG Changer
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!
<!-- TWO STEPS TO INSTALL BACKGROUND CHANGER:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mark Whitnell (mwhitnel@southeast.net) -->
<!-- Web Site: http://users.leading.net/~mwhitnel -->
<! >
<! >
<!-- Begin
if (navigator.appName == "Microsoft Internet Explorer") {
image_directory = "../img/bg-changer/";
clear = new Image(); clear.src = image_directory + "clear.jpg";
pic1 = new Image(); pic1.src = image_directory + "chameleon.jpg";
pic2 = new Image(); pic2.src = image_directory + "gecko.jpg";
pic3 = new Image(); pic3.src = image_directory + "lizard.jpg";
pic4 = new Image(); pic4.src = image_directory + "toad.jpg";
}
function imagechange(imgName) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.body.background = eval(imgName + ".src");
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<body background="clear.jpg" name=bg>
<a href="#" onMouseOver="imagechange('pic1');" onMouseOut="imagechange('clear');"><img src="chameleon.jpg"></a>
<a href="#" onMouseOver="imagechange('pic2');" onMouseOut="imagechange('clear');"><img src="gecko.jpg"></a>
<a href="#" onMouseOver="imagechange('pic3');" onMouseOut="imagechange('clear');"><img src="lizard.jpg"></a>
<a href="#" onMouseOver="imagechange('pic4');" onMouseOut="imagechange('clear');"><img src="toad.jpg"></a>
<!-- Script Size: 1.75 KB -->
Wyszukiwarka
Podobne podstrony:
Windows 7 Logon Background Changer Readmefunction ncurses can change colorBackgrounds!changelogbackgroundconfiguration change management81A290IceBreaker ChangeLogTool changer service functions (SK40 Chain)changes 98 99ChangeLogCHANGESChangeLogChangelog Postal r67604Dust free filter changeChange A Door Handlechange alignementChangeLogCHANGELOGchangelogwięcej podobnych podstron