Javascript not working
<p>I have a JavaScript function, in this function i will write</p>

<pre><code>&lt;script type='text/JavaScript' language='JavaScript'&gt;alert('ha')&lt;/script&gt;
</code></pre>

<p>But while executing this page it doesn't work. This is my code</p>

<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;script language="javascript" type="text/javascript"&gt;
function asd()
{
 document.write("&lt;script language='javascript' type='text/javascript'&gt;alert('asdasd');&lt;/" + "script&gt;");
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="asd();"&gt;
 &lt;span id="gdfg"&gt;&lt;/span&gt;
 &lt;span&gt;dgdfghfghfghfg&lt;/span&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
