<script language="javascript" type="text/javascript">
var images= ["images/2.png", "images/3.png", "images/4.png", "images/5.png"];
var index = 0;
function switch_background(){
if(index ==images_id.length-1)
{
index = 0;
}else{
index++;
}
}
window.onload = function()
{
setInterval(switch_background, 3000);
} </script>
var images= ["images/2.png", "images/3.png", "images/4.png", "images/5.png"];
var index = 0;
function switch_background(){
if(index ==images_id.length-1)
{
index = 0;
}else{
index++;
}
document.getElementById(
"div1"
).style.backgroundImage=
"url("
+images[index]+
")"
;
}
window.onload = function()
{
setInterval(switch_background, 3000);
} </script>