run order of JavaScript in HTML file
<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
        alert('123');        
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    456
    &lt;script type="text/javascript"&gt;    
       alert('789');
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>As the code above.If I remove alert('789');, the order of appearance would be 123->456.
If I remove alert('123');, the order would be 456->789.
If I don't remove any of the two js statements, the order of appearance would be 123->789->456.
Isn't it a bit strange?</p>
