This article mainly introduces JS to determine whether the Web page in the IFRAME scroll to the bottom trigger event, the need for friends can refer to the
There is a need to determine whether the Web page in the IFRAME scroll to the bottom of the trigger event, the Internet to find a lot of information is said under the current page, simply on their own research, found a solution. ClientHeight: The height of this element, taking up the height of the entire space offsetheight: refers to the height of the content of the element scrolltop: You can understand the length of the scroll bar can be scrolled below is the source code code as follows: <iframe src= "~/ Files/3.html "id=" Iframepage "width=" 825 "onload=" func () "></iframe> <script type=" Text/javascript "> function func () {var IFM = document.getElementById ("Iframepage"); Ifm.height = window.document.body.clientheight-100; <!--in chrome with compatibility issues, FF and IE10 no problem, online said chrome access to the IFRAME in the server environment, do not know what situation--> window.document.getElementById (" Iframepage "). Contentwindow.onscroll = function aaa () {var IFM = document.getElementById (" Iframepage "). ContentWindow.document.documentElement; if (ifm.scrolltop = = ifm.scrollheight-ifm.clientheight) {alert ("in the End"); }} </script>