BACKGROUND CHANGER AFFECT SCRIPT

Bookmark and Share
Step by Step how to install java script effect for Background Changer, you can follow instruction as below to implement in your website or blog :

<!-- 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">

<!-- 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 -->

{ 0 comments... Views All / Send Comment! }

Post a Comment