Is it possible to javascript the list of all the HTML elements in the body with background or background-image CSS properties?
I want to change the background of all the elements in a different color.
function color () {var allElements = document.getElementsByTagName ('*'); (Var i = 0; i & lt; allElements.length; i ++) {All elements [i] .setAttribute ('style', 'background color: # 333;'); }}
Comments
Post a Comment