Call setTimeout() at the entry point of your application. If you are not using any framework, that can just be in a <script> tag at the end of your <body> :)
setTimeout() only runs once, so to do a countdown, you need to call setTimeout again within the block called by setTimeout. Or you can just use setInterval().
<script>
tag at the end of your<body>
:)setTimeout()
only runs once, so to do a countdown, you need to callsetTimeout
again within the block called bysetTimeout
. Or you can just usesetInterval()
.Thanks - I'll play with this in the morning!