+ 4

add class to element

With document.createElement I can create an element, but how can I add a class to that element?

4th Jan 2017, 2:50 PM
dan
1 Réponse
+ 9
element.className = name;
4th Jan 2017, 3:10 PM
Valen.H. ~
Valen.H. ~ - avatar