title: How do I make a menu pop up when the user clicks the menu button?
body: <p>I'm new to web development and I dont have much experience. I have been trying to create a menu that becomes visible when the user clicks it. I have been able to make it pop-up but it doesnt stay visible. It becomes visible for a second and turns invisible again. I have tried this with the 'display' property as well. However, that has the same results. Here is my code:</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
      function opnmenu () {
          document.getElementById("menu").style.visibility="visible";
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onLoad="document.getElementById('menu').style.visibility='hidden';"&gt;
      &lt;div id="menubar"&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;div id="menuimg"&gt;
                          &lt;form&gt;
                              &lt;input type="image" class="menubut" src="menu.png" alt="submit" onClick="opnmenu()"&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;h1&gt; Entrepreneur&lt;/h1&gt;
      &lt;hr&gt;
      &lt;div id="menu"&gt;
          &lt;ul&gt;
              &lt;li&gt;Home&lt;/li&gt;
              &lt;li&gt;Motivation&lt;/li&gt;
              &lt;li&gt;Books&lt;/li&gt;
              &lt;li&gt;Videos&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Any help will be appreciated.
  Thank You.</p>