I have these tags in my HTML,
<div id="main">
<div id="options"></div>
<div id="searchField"></div>
<div id="options"></div>
<div id="results">
***<!-- I want to add elements here -->***
<div id="pagenumber">
<div id="footer">
</div>
</div>
What would be the javascript code that appends children above id="pagenumber" and inside id="results"?
You could use the following approach:
To insert after the
pagenumbernode you could use:References:
node.insertBefore().