📌  相关文章
📜  js 在 div 之后添加文本 - Javascript 代码示例

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

代码示例1
'beforebegin' Before the element itself.
'afterbegin' Just inside the element, before its first child.
'beforeend' Just inside the element, after its last child.
'afterend' After the element itself.
let div = document.getElementById('parentDiv');
div.insertAdjacentText('afterbegin', 'My Plain Text..');