在webview中使用javascript检测网页的结尾

时间:2018-03-16 16:50:31

标签: javascript android-webview

我使用以下代码检测到使用javascript访问页面的结尾:

window.onscroll = function(ev) {
    if (((document.documentElement && document.documentElement.scrollHeight) || document.body.scrollHeight)) {
        alert("Bottom of page");
    }
};

它适用于桌面的chrome,但不适用于android webview

0 个答案:

没有答案