How can the style/class of an element be changed?
Answer / Syed Taqi Raza
To change the style or class of an HTML element with JavaScript, you can use the dot notation to access the element and modify its style or class properties. For example: document.getElementById("elementID").className = "newClass"; or document.getElementById("elementID").style.propertyName = "value"
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the way to get the status of a CheckBox?
Who is the world famous hacker?
Is it possible to break javascript code into several lines?
Write the point of difference between web-garden and a web-farm?
What is the difference between let, const, and var?
What is this keyword?
9 Answers Cognizant, Infosys, Satyam,
What is client side programming?
Which built-in method returns the index within the calling string object of the first occurrence of the specified value?
What is difference between ajax and javascript?
how to create a moving div?
Explain what is javascript? List some data types supported by javascript?
What is unobtrusive javascript? How to add behavior to an element using javascript?