javascript function doesn't return any result
<p>I've got a javascript function</p>

<pre><code>&lt;head&gt;
    &lt;title&gt;
        Test
    &lt;/title&gt;
    &lt;script type="text/javascript"&gt;
        function GetResult()
        {
            count = 0;
            for(var i=0;i&lt;10;i++){
                for(var j=1;j&lt;4;j++){
                    if (document.getElementById("label"+i+j).checked){
                        count +=1;
                    }
                }
            }
            if (count!=10)
                alert("Please answer all the questions");
            else alert(count);
        }
    &lt;/script&gt;
</code></pre>

<p></p>

<p>In the code there are a lot of radiobutton. ther look like</p>

<pre><code>&lt;input type="radio" name="q1" value="1" id="label01"/&gt;
</code></pre>

<p>But my javascript function never shows alert. 
The button that is supposed to call function is</p>

<pre><code>&lt;input type="button" value="Result" onclick="GetResult()"/&gt;
</code></pre>

<p>Maybe button doesn't call <code>GetResult</code>?</p>
