Javascript examples for CSS Style Property:background
Return the background property values of a document:
<!DOCTYPE html> <html> <body style="background:#f3f3f3 url('http://java2s.com/resources/a.png') no-repeat right top;"> <h1>Hello World!</h1> <button type="button" onclick="myFunction()">Get background values</button> <script> function myFunction() {// w ww .j a v a2 s .co m console.log(document.body.style.background); } </script> </body> </html>