How can the style/class of an element be changed?
Submitted by: MuhammadIt can be done in the following way:
JavaScript
document.getElementById("myText").style.fontSize = "20?;
or
document.getElementById("myText").className = "anyclass";
Submitted by: Muhammad
JavaScript
document.getElementById("myText").style.fontSize = "20?;
or
document.getElementById("myText").className = "anyclass";
Submitted by: Muhammad
Read Online Expert Developer JavaScript Job Interview Questions And Answers
Top Expert Developer JavaScript Questions
☺ | Mention what is the disadvantage of using innerHTML in JavaScript? |
☺ | Which keyword is used to print the text in the screen? |
☺ | Why it is not advised to use innerHTML in JavaScript? |
☺ | Explain the concept of unobtrusive JavaScript? |
☺ | How are JavaScript and ECMA Script related? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | jQuery Mobile Interview Questions. |