I am trying to change the text of h1
via using following code
document.getElementById("wpbody-content").getElementsByClassName("wrap").getElementsByTagName('h1')[0].innerHTML = 'Application Forms';
Here is the HTML
code
<div id="wpbody-content">
<div class="wrap">
<h1>Text</h1>
</div>
<div class="clear"></div></div>
But it shows me following error
TypeError: document.getElementById(...).getElementsByClassName(...).getElementsByTagName is not a function