简体   繁体   English

如何使用 Javascript 查找 Masterpage 的高度和宽度

[英]How to find Masterpage height and width using Javascript

如何使用 Javascript 查找offsetheightoffsetwidth

Isn't the MasterPage height and width just the document's height and width? MasterPage高度和宽度不就是文档的高度和宽度吗? And by offsetWidth and offsetHeight, do you mean you want the width and height?而通过offsetWidth和offsetHeight,你的意思是你想要宽度和高度吗? Offset is usually for left and top.偏移量通常用于左侧和顶部。

Use jQuery's width and height methods:使用 jQuery 的widthheight方法:

var width = $(document).width();
var height = $(document).height();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM