JavaScript Timer

<!DOCTYPE html>

<html>

<body>

<h2>JavaScript Timing Sample</h2>

<p>Click on "Try it". Wait 5 seconds, and the page will alert "Hello How are you!!".</p>

<button onclick="setTimeout(myFunction, 5000);">Try it</button>

<script>

function myFunction() {

  alert('Hello How are you!!');

}

</script>

</body>

</html>


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *