Normal Slide Show effects using Javascript | Sanwebcorner

Normal Slide Show effects using Javascript

Normal Slide Show effects using JavaScript :

This is one of the Very simple slide show effect using java script, we have to set the slide show timings also.Try It , It is very useful to you. 

normal slide show effect

Program  Code:


<html>
<head>
<script language="JavaScript1.1">
<!--
var image1=new Image()
image1.src="e1.jpg"
var image2=new Image()
image2.src="e2.jpg"
var image3=new Image()
image3.src="e3.jpg"
//-->
</script>
</head>
<body>
<img src="e1.jpg" name="slide" width=500 height=250>
<script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src")
if (step<3)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
</body>
</html>

Download Code