Which of the following DHTML methods is used to change the style of an HTML element
Which of the following DHTML methods is used to change the style of an HTML element
using CSS dynamically?
Show answerHide answer
Correct answer: (C) element.style.backgroundColor = "red"
Explanation
In DHTML, a style is changed at run time by assigning to the element's style object, e.g. element.style.backgroundColor = "red". There is no setCSS() method, and resize is an event, not a styling method.