gpt4 book ai didi

javascript - document.body.scrollHeight 在 firefox/chrome 中产生两种不同的结果

转载 作者:数据小太阳 更新时间:2023-10-29 05:27:11 28 4
gpt4 key购买 nike

我正在尝试获取整个页面的高度(包括滚动)。在 chrome 中,document.body.scrollHeight 就是这样做的。在 Firefox 中,这不起作用...在 Firefox 中有什么等价物?

最佳答案

绝对开始使用 jquery,访问 $(document).height() 将为您完成所有浏览器检查。

http://api.jquery.com/height/

关于javascript - document.body.scrollHeight 在 firefox/chrome 中产生两种不同的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8857341/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com