Answers for "adjusthtml after"

2

htmladjacent

// <div id="one">one</div>
var d1 = document.getElementById('one');
d1.insertAdjacentHTML('afterend', '<div id="two">two</div>');

// At this point, the new structure is:
// <div id="one">one</div><div id="two">two</div>
Posted by: Guest on February-28-2020

Browse Popular Code Answers by Language