Open In App
Related Articles

Web Window API | Window scrollbars property

Improve Article
Save Article
Like Article

In Web APIWindow.scrollbars property returns the object of scrollbars, for which we can check the visibility.

Syntax :

objectReference = window.scrollbars

Example : Check the visibility

<!DOCTYPE html>
        Window scrollbars property
        a:focus {
            background-color: magenta;
    <script type="text/javascript">
        function getvisibility() {
            document.getElementById('visibility').innerHTML =
        <h1 style="color:green;">  
        <h2>HTML Window scrollbars property</h2>
        <button onclick="getvisibility ();"
          Check visibility
        <p id='visibility'></p>

Click the button:

When the button is clicked:

Supported Browsers:

  • Google Chrome
  • Edge 12
  • Firefox
  • Safari
  • Opera

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 31 Jul, 2019
Like Article
Save Article
Similar Reads
Complete Tutorials