Home > Web Front-end > JS Tutorial > js determines whether the web page in the iframe scrolls to the bottom and triggers the event_javascript skills

js determines whether the web page in the iframe scrolls to the bottom and triggers the event_javascript skills

WBOY
Release: 2016-05-16 16:55:12
Original
1549 people have browsed it

There was a need before to determine whether the web page in the iframe scrolled to the bottom to trigger an event. I found a lot of information on the Internet that said it was under the current page, so I simply did some research on my own and found a solution.

clientHeight: the height of this element, the height of the entire space occupied

offsetHeight: refers to the height of the element content

scrollTop: can be understood as the length that the scroll bar can scroll

or less Is the source code

Copy code The code is as follows:



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template