Newbie: hanging browser on function call
<p>I just started learning JavaScript and am wondering why this simple snippet hangs when I click on the "Call function" button. What am I missing?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;

&lt;script type="text/javascript"&gt;
function myfunction()
{
document.write("hello");
}
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;form&gt;
&lt;input type="button" 
onclick="myfunction()" 
value="Call function"&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
