Jump to content

increasing number after specific period of time?


yaragallamurali

Recommended Posts

<!DOCTYPE html><html><head><meta charset="utf-8"><title>title</title><script>count = 0;window.onload = init;function init() {window.setInterval(incre,5000);}function incre(){count++;document.getElementById('out').innerHTML = 'count is '+count;}</script></head><body><div id="out">count is 0</div></body></html>
Edited by davej
Link to comment
Share on other sites

<!DOCTYPE html><html><head><meta charset="utf-8"><title>title</title><script>count = 0;window.onload = init;function init() {window.setInterval(incre,5000);}function incre(){count++;document.getElementById('out').innerHTML = 'count is '+count;}</script></head><body><div id="out">count is 0</div></body></html>

Thank you so much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...