Image sliders (also known as image carousels or slideshows) can be a convenient way to display multiple images, videos, or graphics on your website. The thought of big, beautiful, flashy image shows can be quite alluring. Compelling images can draw new visitors into your site, capturing their attention immediately.
<html>
<style>
.sl
{
display: none;
}
</style>
<body>
<img src="1.jpg"
class="sl">
<img src="2.jpg"
class="sl">
<img src="3.jpg"
class="sl">
<img src="4.jpg"
class="sl">
<img src="5.jpg"
class="sl">
<img src="6.jpg"
class="sl">
<img src="7.jpg"
class="sl">
<img src="8.jpg"
class="sl">
<img src="9.jpg"
class="sl">
<img src="10.jpg"
class="sl">
</body>
<script>
var m=0;
disp();
function disp()
{
var
i;
var
x=document.getElementsByClassName("sl");
for(i=0;i<x.length;i++)
{
x[i].style.display="none";
}
m++;
if(m>x.length)
{
m=1;
}
x[m-1].style.display="block";
setTimeout(disp,200);
}
</script>
</html>
OUTPUT
Post a Comment