hasChildNodes()
childNodes
children
hasChildren()
element.appendChild()
element.insertChild()
element.addChild()
element.attachChild()
element.getChildren()
element.childNodes
element.getElementsByTagName()
element.getChildNodes()
element.innerHTML
element.value
element.content
element.innerText
removeAttr()
deleteAttribute()
removeAttribute()
deleteAttr()
element.addEvent()
element.addEventListener()
element.attachEvent()
element.onEvent()
document.getElementByTagName()
document.getElementsByTagName()
document.querySelectorAll()
document.tagName()
element.background = "red";
element.style.backgroundColor = "red";
element.style.background = "red";
element.css.backgroundColor = "red";
getElement()
getElementById()
getId()
queryElement()
element.getValue()
getElementByTagName()
getElementByClass()
querySelector()
removeElement()
removeNode()
removeChild()
deleteNode()
What will the following JavaScript code do?
var element = document.getElementById("myDiv");element.remove();
Remove the element with the ID "myDiv" from the DOM
Remove all child elements inside the element with the ID "myDiv"
Hide the element with the ID "myDiv"
Move the element with the ID "myDiv" to a different location
innerHTML
outerHTML
textContent
value
getElement(id)
getElementById(id)
elementById(id)
document.createElement()
document.appendElement()
document.insertElement()
document.newElement()
insertBefore()
insertAfter()
appendChild()
prependChild()
replaceNode()
replaceElement()
replaceChild()
replaceWith()
classList.add()
classList.remove()
classList.toggle()
classList.replace()
innerText
All of the above
document.getElementByClassName()
document.getElementsByClassName()
document.querySelectorAll(".class")
Both b and c
insertPrevious()
appendBefore()
addBefore()