w3resource logo

JavaScript Client Objects

JavaScript Window Object : scrollbars Property

Secondary Nav


The scrollbars property of the window object refers the browser window's vertical and horizontal scroll bars for the document area. The value of the scrollbars property itself has one property, visible. The scrollbars bar are visible if it is true and hidden if is false.


Implemented in JavaScript 1.2



Example of Window Object : scrollbars property

In the following web document scrollbars property test whether the scrollbars is visible or not.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript window object. scrollbars property Example-1</title>
<h1 style="color: red">JavaScript window Object :scrollbars Property</h1>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[ 

View the example of window object's scrollbars property in the browser

Supported Browser

Internet Explorer 7 Firefox 3.6 Google Chrome 7 Safari 5.0.1 Opera 10
Yes Yes Yes Yes Yes

See also :

JavaScript Client side objects, methods, properties.

JavaScript Core objects, methods, properties.

Join our Question Answer community to learn and share your programming knowledge.