Show with an example how to replace the div with a page:
<div id="new_message"></div> on
<div>Некий текст</div> <div id="new_message"></div> preferably with js.
on
Show with an example how to replace the div with a page:
<div id="new_message"></div> on
<div>Некий текст</div> <div id="new_message"></div> preferably with js.
Create a new div , add text to it, find the parent of the new_message block, and add the created div before the div with id="new_message"
var el = document.getElementById('new_message'); var parentEl = el.parentNode; newEl = document.createElement('div'); newEl.innerHTML = 'Некий текст'; parentEl.insertBefore(newEl, el); Source: https://ru.stackoverflow.com/questions/590980/
All Articles