Skip to content

styles or classes #68

Answered by Bunny77K9
DuajDiaz asked this question in Q&A
Discussion options

You must be logged in to vote

JavaScript can be used to easily modify classes and styles in an element by making use of the following syntax:

Modify styles: document.getElementById(“input”).style.fontSize = “10”;
Modify class: document.getElementById(“button”).className = “classname”;

Next up on this top Web Development interview questions and answers blog, let us take a look at the advanced set of questions.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DuajDiaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants