title: how to show or hide a div on button click using javascript
body: <p>here the following are the codes</p>
  
  <pre><code>&lt;style type="text/css"&gt;
  #mydiv{ margin:0 auto;padding:0;width:250px;height:100px; border:1px solid threedshadow;display:none;}
  &lt;/style&gt;
  
  &lt;script type="text/javascript"&gt;
  function show()
  {
  var div=document.getElementById('mydiv');
  div.style.display == "none" ? "block" : "none";
  }
  &lt;/script&gt;
  
  
  
  &lt;input type="button" onclick="show()" value="show"/&gt;
  &lt;div id="mydiv"&gt;
  </code></pre>
  
  <p>this code does not working can anybody help me!!</p>