How can the style/class of an element be changed?

Discussion in 'Web Services' started by raghavraaz, Aug 26, 2016.

  1. raghavraaz

    raghavraaz New Member

    Hi Please help.

    How can the style/class of an element be changed?
     
  2. anneroberts

    anneroberts Member

    To change all classes for an element: To alter all absolute classes with one or added new classes, set the className attribute: document.getElementById("MyElement").className = "MyClass"; (You can use a space-delimited account to administer assorted classes.).
     

Share This Page