• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Using Core HTML Properties > The scrollHeight, scrollWidth, scrollLe...

The scrollHeight, scrollWidth, scrollLeft, and scrollTop Properties

You use the scrollHeight, scrollWidth, scrollLeft, and scrollTop properties with elements that can be scrolled, such as <BODY> and <TEXTAREA> elements. The scrollHeight and scrollWidth properties give the actual height and width of an object (no matter how much of the object is visible currently). The scrollLeft and scrollTop properties give the distance in pixels from the upper left of the scrolling area to the upper left of the object you’re scrolling. You can see the support for these properties in Table 5.51.

Table 5.51. The scrollHeight, scrollWidth, scrollLeft, and scrollTop Properties
Property NS2 NS3 NS4 NS6 IE3a IE3b IE4 IE5 IE5.5 IE6
scrollHeight       x x x x
  Read-only
  Type: Integer
scrollWidth       x x x x
  Read-only
  Type: Integer
scrollLeft       x x x x
  Read-only
  Type: Integer
scrollTop       x x x x
  Read-only
  Type: Integer



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint