Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

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

Previous Post Next Post