更新时间:2023-01-27 20:36:12
如果你使用jQuery,你可以得到窗口大小或者使用jQuery方法的文档:
If you are using jQuery, you can get the size of the window or the document using jQuery methods:
$(window).height(); // returns height of browser viewport
$(document).height(); // returns height of HTML document
$(window).width(); // returns width of browser viewport
$(document).width(); // returns width of HTML document
对于屏幕尺寸,您可以使用屏幕
对象:
For screen size you can use the screen
object in the following way:
screen.height;
screen.width;