Simple Timing


SUBMITTED BY: Guest

DATE: Aug. 20, 2013, 11:49 a.m.

FORMAT: JavaScript

SIZE: 299 Bytes

HITS: 914

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <p>Click the button to wait 3 seconds, then alert "Hello".</p>
  5. <button onclick="myFunction()">Try it</button>
  6. <script>
  7. function myFunction()
  8. {
  9. setTimeout(function(){alert("Hello")},3000);
  10. }
  11. </script>
  12. </body>
  13. </html>

comments powered by Disqus