title: Hide and show a text field
body: <p>i am a beginer to javascript.I want to show a hidden textbox on a button click.i do the bellow code, but it doesnt work.</p>
  
  <p>What is the problem with my code?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
          function display() {
              var z = prompt("enter your name...");
              if(z != null) {
                  document.getElementById("demo").innerHTML = "thankyou " + z + "..";
                  document.getElementById("case").style.visibility = 'visible';
              } else {
                  document.getElementById("demo").innerHTML = "thankyou";
              }
          }
          &lt;/script&gt;
          &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p id="demo"&gt;
              click on the button.....
          &lt;/p&gt;&lt;button type="button" onclick="display()"&gt;submit&lt;/button&gt;
          &lt;form&gt;
              &lt;input type="text" id="case" name="myText" style="display:none"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>