title: Open and close forms onclick javascript
body: <p>I made form open on button click with simple script</p>
  
  <pre><code>&lt;script&gt;
  function showMsg(){
  document.message.style.visibility="visible";
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Form appears, everything works. Now i've added an x to make this form hidden again, i've tried various script but nothing worked. Maybe i need to set div hidden instead of form? Any sugestions?
  Here's my code</p>
  
  <pre><code>&lt;div id="msg"&gt;&lt;class="button" onclick="showMsg();"&gt;
  &lt;form style="visibility:hidden" name="message" method="post" action="contact.php"&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;div id="demo"&gt;
  &lt;table width="230px" align="center" style="box-shadow: 0px 0px 30px 0px rgba(0, 0, 
  0, 100);"&gt;
  &lt;tr&gt;&lt;td colspan=1&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;a href="#" class="close-classic"&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>