title: Javascript change h1 text
body: <p>I am trying to change the text of <code>h1</code> via using following code</p>
  
  <pre><code>document.getElementById("wpbody-content").getElementsByClassName("wrap").getElementsByTagName('h1')[0].innerHTML = 'Application Forms';
  </code></pre>
  
  <p>Here is the <code>HTML</code> code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="wpbody-content"&gt;
    
    &lt;div class="wrap"&gt;
      &lt;h1&gt;Text&lt;/h1&gt;
    &lt;/div&gt;
  
  &lt;div class="clear"&gt;&lt;/div&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But it shows me following error</p>
  
  <pre><code>TypeError: document.getElementById(...).getElementsByClassName(...).getElementsByTagName is not a function
  </code></pre>