scrollHeight Property
Retrieves the scrolling height of the object.
Syntax
HTML N/A Scripting [ iHeight = ] object.scrollHeight
Possible Values
iHeight Non-negative integer that specifies the height, in pixels. The property is read-only with no default value.
Remarks
The height is the distance between the top and bottom edges of the object's content.
For more information about how to access the dimension and location of objects on the page through the document object model, see measuring element dimension and location.
Example
This example uses the scrollHeight property to retrieve the height of the viewable content.
Sample Code
<SCRIPT> function fnCheckScroll(){ var iNewHeight = oDiv.scrollHeight; alert("The value of the scrollHeight property is: " + iNewHeight); } </SCRIPT> : <DIV ID=oDiv STYLE="overflow:scroll; height=100; width=250; text-align:left"> : </DIV> <INPUT TYPE=button VALUE="Check scrollHeight" onclick="fnCheckScroll()">
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. A, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, HEAD, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, META, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.