element.innerHTML
element.value
element.content
element.innerText
getElement()
getElementById()
getId()
queryElement()
insertBefore()
insertAfter()
appendChild()
prependChild()
element.getValue()
innerHTML
innerText
textContent
All of the above
element.background = "red";
element.style.backgroundColor = "red";
element.style.background = "red";
element.css.backgroundColor = "red";
element.appendChild()
element.insertChild()
element.addChild()
element.attachChild()
element.getChildren()
element.childNodes
element.getElementsByTagName()
element.getChildNodes()
removeElement()
removeNode()
removeChild()
deleteNode()
document.createElement()
document.appendElement()
document.insertElement()
document.newElement()
removeAttr()
deleteAttribute()
removeAttribute()
deleteAttr()
getElementByTagName()
getElementByClass()
querySelector()
document.getElementByTagName()
document.getElementsByTagName()
document.querySelectorAll()
document.tagName()
classList.add()
classList.remove()
classList.toggle()
classList.replace()
outerHTML
value
insertPrevious()
appendBefore()
addBefore()
replaceNode()
replaceElement()
replaceChild()
replaceWith()
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
hasChildNodes()
childNodes
children
hasChildren()
element.addEvent()
element.addEventListener()
element.attachEvent()
element.onEvent()
document.getElementByClassName()
document.getElementsByClassName()
document.querySelectorAll(".class")
Both b and c