Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- p{
- font-size:50px;
- font-weight:bold;
- }
- </style>
- </head>
- <body>
- <p style="border:2px solid red">
- <span id="prvoto">1</span>
- <span id="vtoroto">2</span>
- <span id="tretoto">3</span>
- <span id="cetvrtoto">4</span>
- <span id="petoto">5</span>
- <span id="sestoto">6</span>
- <span id="sedmoto">7</span>
- </p>
- <button onclick="funkcija()">START</button>
- <script>
- function funkcija(){
- document.getElementById("prvoto").innerHTML=Math.ceil(Math.random() * 10);
- setTimeout(function(){ document.getElementById("vtoroto").innerHTML=Math.ceil(Math.random() * 10); }, 500);
- setTimeout(function(){ document.getElementById("tretoto").innerHTML=Math.ceil(Math.random() * 10); }, 1000);
- setTimeout(function(){ document.getElementById("cetvrtoto").innerHTML=Math.ceil(Math.random() * 10); }, 1500);
- setTimeout(function(){ document.getElementById("petoto").innerHTML=Math.ceil(Math.random() * 10); }, 2000);
- setTimeout(function(){ document.getElementById("sestoto").innerHTML=Math.ceil(Math.random() * 10); }, 2500);
- setTimeout(function(){ document.getElementById("sedmoto").innerHTML=Math.ceil(Math.random() * 10); }, 3000);
- }
- </script>
- </body>
- </html>
- so mi ja resi toj od Stiv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement