📜  JavaScript after - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:09.648000             🧑  作者: Mango

代码示例1
var parent = document.createElement("div");
var child = document.createElement("p"); 
parent.appendChild(child);

child.after("Text"); 

console.log(parent.outerHTML);
// "

Text
"