Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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>"
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript
ADD COMMENT
Topic
Name
6+8 =