Gets the height of the browser display area: $ (window). Height ();
Gets the width of the browser display area: $ (window). width ();
Gets the document height of the page: $ (document). Height ();
Gets the document width of the page: $ (documents). width ();
Gets the vertical height of the scroll bar to the top: $ (document). ScrollTop ();
Gets the vertical width of the scroll bar to the left: $ (document). ScrollLeft ();
calculated element position and offset: $ (ID). offset ();
The offset method is a useful way to return the offset information for the first element in a wrapper set. By default, the offset information is relative to the body. The result contains top and left two properties.
Offset (options, results)
Options.relativeto Specify a relative count
The ancestor element that calculates the offset position. This element should be relative or absolute positioned. Omitted is relative to body.
Does the Options.scroll
Scroll bar calculation, default True
options.padding whether to calculate padding, default false
Options.margin
Whether margin is counted, by default true
Options.border whether the border is counted, by default true
Child page Control Parent page:
Parent.document.documentElement.scrollTop;
Parent.document.documentElement.clientHeight;
jquery Get scroll bar height