Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title> http://stackoverflow.com/questions/11439499/how-to-call-a-javascript-function-every-second-in-html/ </title>
- <script type="text/javascript">
- <!--
- function CountdownAnzeigen(countdown){
- document.getElementById('countdown').innerHTML = countdown--;
- if (countdown>0) {
- window.setTimeout(function(){window.CountdownAnzeigen(countdown);}, 1000);
- } else { alert('The End');}
- }
- //-->
- </script>
- </head>
- <body>
- <input type="button" value="count down" onclick="window.CountdownAnzeigen(10)"/>
- <div id="countdown"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement