Answers for "adding important to js style"

2

js set important style

function myFunction() {
    var x = document.querySelectorAll("#testDiv p.example");
    x[0].style.setProperty("background-color", "red", "important");
}
Posted by: Guest on September-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language