can't use javaScript setInterval method
<p>i cant use setInterval mehod, i don't know why.
what's wrong with this script, after clicking on stop it doesn't show the result of counter i in the text field.</p>

<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;

        &lt;title&gt;test_setInterval&lt;/title&gt;

        &lt;script type="text/javascript"&gt;
            var i = 0;
            var interval;

            function start ()
            {
                interval = document.setInterval("i++", 1000);
            }

            function stop ()
            {
                document.clearInterval(interval);
                output.value = i;
            }
        &lt;/script&gt;

    &lt;/head&gt;

    &lt;body&gt;
        &lt;input id="output" type="text" /&gt;
        &lt;input id="start" type="button" value="start" onclick="start()" /&gt;
        &lt;input id="stop" type="button" value="stop" onclick="stop()" /&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
