In my code it is so that if I click the button, 3 numbers are directly showed. But I want the first number to be displayed directly, the second number after 2 seconds and the third number after 3 seconds. Here is the whole source code of my page:
<!DOCTYPE html>
<html>
<head>
<script>
window.onload = function(){
myFunction();
}
</script>
<script>
function myFunction()
{
var quotes = [
{text:" <br> 1 <br><br> 2 <br><br> 3 ",},
{text:" <br> 4 <br><br> 5 <br><br> 6 ",},
{text:" <br> 7 <br><br> 8 <br><br> 9 ",},
];
var quote1 = quotes[Math.floor(Math.random() * quotes.length)];
document.getElementById("quote1").innerHTML=
'<p><font size="7">' + quote1.text + '</font></p>';
}
</script>
</head>
<body>
<center>
<div id="quote1"></div>
<br>
<br>
<br>
<br>
<br>
<center>
<a href="#" onclick="myFunction()">Next</a>
</center>
</center>
</body>
</html>
How do I achieve it? P.S. please no Jquery, I use pure Javascript