Javascript examples for CSS Style Property:backgroundAttachment
Get the value of the background-attachment property
<!DOCTYPE html> <html> <body style="background:#f3f3f3 url('http://java2s.com/resources/c.png') no-repeat fixed;"> <h1>Hello World!</h1> <p>The background-image is fixed.</p> <p>The background-image is fixed.</p> <p>The background-image is fixed.</p> <p>The background-image is fixed.</p> <p>The background-image is fixed.</p> <p>The background-image is fixed.</p> <button onclick="myFunction()">Get background-attachment value</button> <script> function myFunction() {// w w w. j a v a2 s . co m console.log(document.body.style.backgroundAttachment); } </script> </body> </html>