Prev Demo
Alerting User For Every 4 Seconds With The Named Function.
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Alerting user for every 4 seconds with the named function.</h1> <p>Click the below button to alert for every 4 seconds.</p> <input type="button" value="Alert" onclick="Function()" /> <p>The alert box repeats for every 4 seconds.</p> <script> function Function() { myVar = setInterval(myAlert, 4000); } function myAlert() { alert("Warning!"); } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output