<html>
<body>
<p>Click "Try it". Wait 3 seconds, and the page will alert "Hello".</p>
<button onclick="setTimeout(myFunction, 3000);">Try it</button>
<script>
function myFunction() {
alert('Hello');
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_timing1 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:40:15 GMT -->
</html>