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
WBOYOriginal
2016-05-16 16:55:121535browse

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:



Statement:
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