I want to display table instead of displaying hi if i click menu 1
<p>in this if i click menu1 hi will display.instead of that i want a to diaplay a table with 5 rows and 6 colunns.any one help me</p>

<h2>JavaScript</h2>

<pre><code>function displayDate1() {
  document.getElementById("demo1").innerHTML=" hi";
  document.getElementById("demo2").innerHTML="";
}
function displayDate2() {
  document.getElementById("demo2").innerHTML="Bye";
  document.getElementById("demo1").innerHTML="";
}
</code></pre>

<h2>HTML</h2>

<pre><code>&lt;h1&gt;My First JavaScript&lt;/h1&gt;
&lt;a href="javascript:void(0);" onclick="displayDate1()"&gt;Menu 1&lt;/a&gt; | &lt;a href="javascript:void(0);"     onclick="displayDate2()"&gt;Menu 2&lt;/a&gt; 
&lt;p id="demo1"&gt; &lt;/p&gt;
&lt;p id="demo2"&gt;&lt;/p&gt;
</code></pre>
