mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:22:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| <head>
 | |
|     <title>setInterval() test</title>
 | |
|     <script>
 | |
|         document.addEventListener("DOMContentLoaded", function () {
 | |
|             var output = document.getElementById("output");
 | |
|             var counter = 0;
 | |
|             function updateOutput () {
 | |
|                 output.innerHTML = `setInterval() was called ${counter} times!`;
 | |
|             }
 | |
|             updateOutput();
 | |
|             setInterval(function () {
 | |
|                 counter++;
 | |
|                 updateOutput();
 | |
|             }, 1000);
 | |
|         });
 | |
|     </script>
 | |
| </head>
 | |
| <body>
 | |
|     <div id="output"></div>
 | |
| </body>
 | |
| </html>
 | 
