0
Q:

style through javascript

// Here are two different ways
document.getElementById("myH1").style.color = "red";
element.style.backgroundColor = "red";   // set the background color of an element to red
6

 document.getElementById("myH1").style.color = "red";  
0
element.style.backgroundColor = "red";   // set the background color of an element to red
0

New to Communities?

Join the community