javascript - How to get the value of h1 tag using JS? -
i have 3 pages, 2 pages wordpress pages , other 1 custom page template form. 2 pages created using wp-job manager plugin. 1st page has had dropdown menu , contains list of jobs. on 2nd page description of job.
now, want value of h1 tag on 2nd page after user click input button , pass 3rd page , displayed in 1 of input textbox (position input textbox) using js.
how this?
here's link of 2nd page
3rd page
html:
<header class="entry-header"> <h1 class="entry-title">collections trainer</h1> </header>
vanilla javascript solution (no framework required):
var h1text = document.queryselector(".entry-title").textcontent;
Comments
Post a Comment