E Online Support - Free Software Download
How to make background to change different photos?
I want my background image to change,how can i do that using javascript.
Shruti
Answer
1

I have a code to make the background change to different photos hope hope it will help you
<html>
<head>

<style>


body{
/*Remove below line to make bgimage NOT fixed*/
background-attachment:fixed;
background-repeat: no-repeat;
background-size: cover;
/*Use center center in place of 300 200 to center bg image*/
background-position: 0 0; background-
}
</style>

<script language="JavaScript1.2">

//Background Image Slideshow- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

//Specify background images to slide
var bgslides=new Array()
bgslides[0]="http://i892.photobucket.c…

bgslides[1]="http://i892.photobucket.c…

bgslides[2]="http://i892.photobucket.c…

//Specify interval between slide (in miliseconds)
var speed=2000

//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=bgslides[i]
}

var inc=-1

function slideback(){
if (inc<bgslides.length-1)
inc++
else
inc=0
document.body.background=processed[inc…
}

if (document.all||document.getElementById)
window.onload=new Function('setInterval("slideback()",spee…

</script>

</head>

</html>
Question*:
Description*:
Script:
Related To:
 PHP    HTML    CSS    JAVASCRIPT    JQUERY   
 AJAX    WINDOWS    GAMES    DRIVERS    MAC   
 LINUX    MOBILE    GADGETS   
Security Code:
3621
Enter Security Code:
 
Facebook   Linkedin   Skype   Twitter