title: innerHTML not displaying text
body: <p>Please excuse my basic query to javascript and html</p>
  
  <p>I am new to javascript and html. I am trying to work with javascript on click and few other things. In below code, am trying to display a text on "onclick" function. I am using an external javascript.</p>
  
  <pre><code>    &lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html"; charset="utf-8" &gt;
          &lt;script type="text/javascript" src="/home/roger/Documents/html/myScript.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
    &lt;body&gt;
  
  
      &lt;form&gt;
        First Name: &lt;input type="text" name="first" id="names"/&gt;&lt;br&gt;
        Phone Number: &lt;input type="number" name="numb" id="numb"/&gt;&lt;br&gt;  
        &lt;button type="button" onclick="verifyText()"&gt;Click Me!&lt;/button&gt; 
      &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Below is my code in myScript.js</p>
  
  <pre><code>function verifyText(){
  
      document.getElementById("names").innerHTML = "Why not displaying?.";
  
  }
  </code></pre>
  
  <p>If I put alert in function, pop comes out, but I am unable to figure why innerHTML is not working. Any help will be highly appreciated. Thanks. </p>