A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLElement/scrollHeight below:

scrollHeight · WebPlatform Docs

scrollHeight

Property of dom/HTMLElementdom/HTMLElement

Syntax
var result = element.scrollHeight;
element.scrollHeight = value;
Examples

This example uses the scrollHeight property to retrieve the height of the viewable content.

<script type="text/javascript">
function fnCheckScroll(){
    var iNewHeight = oDiv.scrollHeight;
    alert("The value of the scrollHeight property is: "
        + iNewHeight + "px");
}
</script>
...
<div id="oDiv" style="overflow: scroll; height= 100px; width= 250px; text-align: left">
    ...
</div>
<button onclick="fnCheckScroll()">Check scrollHeight</button>

View live example

Notes Remarks

The height is the distance between the top and bottom edges of the object’s content. This property is read-only on HTML documents, and read-write on fixed regions. For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML) Object Model, see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.

Syntax Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4