title: How To display text when we click button
body: <pre><code>&lt;html&gt;
     &lt;head&gt;
       &lt;script&gt;
         function loadXMLDoc()
         {
            Welcome To Ajax
         }
       &lt;/script&gt;
     &lt;/head&gt;
     &lt;body&gt;
        &lt;div id="myDiv"&gt;&lt;h2&gt;Let AJAX change this text&lt;/h2&gt;&lt;/div&gt;
        &lt;button type="button" onclick="loadXMLDoc()"&gt;Change Content&lt;/button&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to display text when we click button. How to display text when we click button?</p>