Javascript function call is not working
<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
function displayDate()

{
alert("hi");
 var d=new Date();
 var theDay=d.getDay();
 switch (theDay)
 {
 case 5:
   document.write("Finally Friday");
   break;
 case 6:
   document.write("Super Saturday");
   break;
 case 0:
   document.write("Sleepy Sunday");
   break;
 default:
   document.write("I'm looking forward to this weekend!");
 }

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;My First Web Page&lt;/h1&gt;
&lt;p id="demo"&gt;This is a paragraph&lt;/p&gt;
alert("before function call");
&lt;button type="button" onclick="displayDate()"&gt;Display Date&lt;/button&gt;
alert("after function call");
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
