top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How do you change the style/class on any element using JavaScript?

+2 votes
324 views
How do you change the style/class on any element using JavaScript?
posted Jul 29, 2015 by Shivaranjini

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

document.getElementById(“myText”).style.fontSize = “10";

-or-

document.getElementById(“myText”).className = “anyclass”;

answer Aug 7, 2015 by Karthick.c
...