gpt4 book ai didi

JavaScript/jQuery : how do I get the inner window height?

转载 作者:数据小太阳 更新时间:2023-10-29 04:59:36 25 4
gpt4 key购买 nike

比如...不包括地址栏、书签等的高度,只是查看空间。

$(window).innerHeight()

似乎不起作用。

最佳答案

使用.height()为此,如 API 中所述:

This method is also able to find the height of the window and document.

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document

至于为什么.innerHeight()不工作:

This method is not applicable to window and document objects; for these, use .height() instead.

关于JavaScript/jQuery : how do I get the inner window height?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3791049/

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