htmladjacent

Solutions on MaxInterview for htmladjacent by the best coders in the world

showing results for - "htmladjacent"
Maissane
19 Nov 2020
1// <div id="one">one</div>
2var d1 = document.getElementById('one');
3d1.insertAdjacentHTML('afterend', '<div id="two">two</div>');
4
5// At this point, the new structure is:
6// <div id="one">one</div><div id="two">two</div>