Java Script MCQ Set Paper 5
Java Script MCQ Set Paper 5
[Marks]1
[Negative Marks]0
Q.25) How do you create a new HTML element using the DOM in JavaScript?
*[a] createElement()
[b] createNode()
[c] newElement()
[d] appendElement()
*[a] appendChild()
[b] insertBefore()
[c] addNode()
[d] addElement()
Q.27) How do you change the text content of an HTML element using the
DOM in JavaScript?
[a] Using the innerText property.
*[b] Using the textContent property.
[c] Using the innerHTML property
[d] Using the innerText and textContent properties interchangeably.
[S1] This is for the solution
Q.30) How do you modify the CSS styles of an HTML element using the DOM
in JavaScript?
[a] Using the setAttribute() method.
[b] Using the getAttribute() method.
[c] Using the classList property.
*[d] Using the style property.