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

  • : 372
  • : 2
    Previous Next

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


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

    you can suggest other answer in comment box

  • Exam: Java Script Interview QUESTIONS

    Recommended Learning for you

    Subscribe here for free mock test on IAS PCS SSC and other competitive exam. Signup here to get SSC CGL Solution and main exam study material