JavaScript Window pageYOffset
JavaScript Window pageYOffset
The pageYOffset property is used to return the pixels a document has scrolled from the upper left corner of the window. This property is equal to the scrollY property. It is a read-only property.
Syntax:-
Its syntax is:- window.pageYOffset OR pageYOffset
Return:-
Its return is:- number of pixels document has scrolled from upper left corner of the window