JS provide setInterval() to create slider,
setInteval("functionname",1000);
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
setInterval(myfun,1000);
i=1;
function myfun()
{
if(i>3)
i=1
document.getElementById("img1").src = "img"+i+".jpg";
i++;
}
</script>
</head>
<body>
<img id="img1" />
</body>
</html>
Post a Comment
POST Answer of Questions and ASK to Doubt