Posts by JPM • 5 points
1 post
-
-4
votes3
answers101
viewsA: Why am I not able to modify the class of the element with the classList property?
Is missing by text, ex.: Text as below: let p1 = document.querySelector("#p1"); p1.classList = "new-class"; .class1{ color: blue; } .class2{ font-size: 12px; } .class3{ font-weight: bold; }…
javascriptanswered JPM 5