jeudi 25 décembre 2014

JavaScript setInterval for opera mini and other mobile browsers


I'm facing problem using setInterval function in my website. I've a small section of my code below. I'm basically trying to increase the count by 1 and print it on screen.



<div id="test"></div>

<script>

var count = 0;
setInterval(function() {
document.getElementById('test').innerHTML=count;
count++;
}, 1000);


</script>




Aucun commentaire:

Enregistrer un commentaire