Advertisement
Viky__9

conta ore si aggiorna

Jun 17th, 2021
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Document</title>
  7. </head>
  8. <body>
  9.    
  10. <p id="func"></p>
  11. <p id="interval"></p>
  12.     <script>
  13.  
  14.         setTimeout(timeout,5000);
  15.         function timeout(){
  16.             document.getElementById('func').innerHTML="timeout";
  17.  
  18.         }
  19.  
  20.         setInterval(interval, 3000);
  21.         function interval(){
  22.             let data= new Date();
  23.  
  24.             document.getElementById('interval').innerHTML=data.getHours()+" "+data.getMinutes()+
  25.             " "+ data.getSeconds()+ " "+ data.getMilliseconds()+" "+ data.getUTCMilliseconds();
  26.         }
  27.     </script>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement