gpt4 book ai didi

javascript - window.outerWidth VS $(window).outerWidth()

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:26:41 24 4
gpt4 key购买 nike

我只是想知道 window.outerWidth$(window).outerWidth() 之间的区别,如果有的话。

我真的无法在 Google 上找到太多关于此的信息,所以我想我会吸引大众。这只是一个普遍的问题,而不是一个具体的问题。

最佳答案

Jquery's outerWidth :

Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels.

If includeMargin is omitted or false, the padding and border are included in the calculation; if true, the margin is also included.

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

window.outerWidth :

window.outerWidth gets the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.

关于javascript - window.outerWidth VS $(window).outerWidth(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11530237/

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