<!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>
Leave a Reply