Onclick() function on working
<p>all! I am having a problem using the a simple onclick method.  Kindly please help me out.  Here is that code... When i click on the button nothing really happens. </p>

<pre><code>window.onload=initall();
var xhr = false;

function initall(){

    var btn=document.getElementById('btn');

    btn.onclick=alert('hi');
}



&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;

&lt;title&gt;Untitled Document&lt;/title&gt;

&lt;script type="text/javascript" src="testjs.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;input type="text" required name="id"&gt;
&lt;input type="button"  id="btn" value="send"&gt;
&lt;div id="result"&gt;&lt;/div&gt;
&lt;/body&gt;

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