Javascript setInterval loop stopping
<p>i want to clear the interverl when the h = 0; m = 0; s = 0;</p>

<p>how to do that... this is looping always...</p>

<p>look at the codes</p>

<pre><code>var h = 10;
var m = 11;
var s = 12;


function countdown() {

    h--;
    m--;
    s--;

    var t = h + ":" + m + ":" + s;

    document.getElementById("show").innerHTML = t;


    if (h == 0 &amp;&amp; m == 0 &amp;&amp; s == 0) {
        clearInterval(timer);
    }

}

var timer = setInterval('countdown()',1000);

countdown();
</code></pre>
