Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.getComputedStyle(document.querySelector("#example"),null).getPropertyValue('background-color'); //return rgb
- window.getComputedStyle(document.querySelector("#example"),null).getPropertyValue('background'); //return null
- document.querySelector("#example").style.backgroundColor; //If the value is not set, returns empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement