javascript - Time Delayed Action


SUBMITTED BY: Guest

DATE: June 12, 2013, 7:17 p.m.

FORMAT: JavaScript

SIZE: 330 Bytes

HITS: 914

  1. <!DOCTYPE html>
  2. <html>
  3. <head><title></title>
  4. <script>
  5. function timeOut() {
  6. setTimeout(function(){sendAlert()},5000);
  7. }
  8. function sendAlert() {
  9. alert("This is your time delayed alert");
  10. }
  11. </script>
  12. </head>
  13. <body onload="timeout()">
  14. </body>
  15. </html>

comments powered by Disqus