Inserting an element from the end of a body is appendChild, so what is used before inserting it into the first element?

inserting an element from the end of a body is appendChild, so what is used before inserting it into the first element?

Apr.10,2022

let div = document.createElement('div')
let firstChild = document.body.firstChild
document.body.insertBefore(div, firstChild)

is summarized as a function:

function insertBefore(node, newElement) {
  node.insertBefore(newElement, node.firstChild)
}

let div = document.createElement('div')
insertBefore(document.body, div)

insertbefore


rootNode.insertAdjacentHTML ('afterbegin', template); the


insertBefor method adds a new node (relative to the child node) in front of the existing node. For example: insertBefore (newchild,rechild)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d27d-3473a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d27d-3473a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?