Answers for "JavaScript after"

-1

JavaScript after

var parent = document.createElement("div");
var child = document.createElement("p"); 
parent.appendChild(child);

child.after("Text"); 

console.log(parent.outerHTML);
// "<div><p></p>Text</div>"
Posted by: Guest on November-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language