Question discussion

Which of the following DHTML methods is used to change the style of an HTML element using CSS dynamically?

359248Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which of the following DHTML methods is used to change the style of an HTML element using CSS dynamically?
  • Adocument.createElement("style")
  • Bdocument.getElementById("element").setCSS()
  • Celement.style.backgroundColor = "red"
  • Dwindow.addEventListener("resize")
Correct answer: C

Explanation

element.style.backgroundColor = "red" changes the CSS style of an element dynamically.

Discussion 0

Nobody has replied yet. Start the discussion!