Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript delay action

<!DOCTYPE html>
<html>
   <body>
      <button onclick="timeFunction()">Submit</button>
      <script>
         function timeFunction() {
            setTimeout(function(){ alert("After 5 seconds!"); }, 5000);
        }
</script>
<p>Click the above button and wait for 5 seconds.</p>
</body>
</html>
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #javascript #delay #action
ADD COMMENT
Topic
Name
8+7 =