当前位置:网站首页>js dynamically get screen width and height
js dynamically get screen width and height
2022-08-05 06:13:00 【CrazyQiQi】
Javascript:
The width of the visible area of the web page: document.body.clientWidth
The visible area of the web page is high: document.body.clientHeight
The width of the visible area of the web page: document.body.offsetWidth (including the width of the border)
The height of the visible area of the web page: document.body.offsetHeight (including the height of the edge)
Web page body full text width: document.body.scrollWidth
Height of the full text of the page body: document.body.scrollHeight
The web page is scrolled high: document.body.scrollTop
The page is scrolled to the left: document.body.scrollLeft
On the body of the page: window.screenTop
The left part of the body of the webpage: window.screenLeft
High screen resolution: window.screen.height
Width of screen resolution: window.screen.width
Screen available workspace height: window.screen.availHeight
Screen available workspace width: window.screen.availWidth
jQuery gets screen width and height in real time
// native jswindow.οnlοad=function(){changeDivHeight();}//When the browser window size changes, set the height of the displayed contentwindow.οnresize=function(){changeDivHeight();}function changeDivHeight(){var h = document.documentElement.clientHeight;//Get page visible height}// jquery$(window).resize(function(){var Height = $(window).height();var Width = $(window).width();})边栏推荐
- [Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
- 入门文档07 分阶段输出
- spark算子-wholeTextFiles算子
- spark operator - map vs mapPartitions operator
- The problem of redirecting to the home page when visiting a new page in dsf5.0
- 腾讯云消息队列CMQ
- 有哪些事情是你做了运维才知道的?
- idea 常用快捷键
- TCP/IP四层模型
- 解决这三大问题,运维效率将超90%的医院
猜你喜欢
随机推荐
交换机原理
Mongodb query analyzer parsing
Getting Started Document 01 series in order
[Day1] (Super detailed steps) Build a soft RAID disk array
传输层协议(TCP3次握手)
[Day8] (Super detailed steps) Use LVM to expand capacity
spark源码-任务提交流程之-5-CoarseGrainedExecutorBackend
Spark source code - task submission process - 4-container to start executor
单臂路由与三成交换机
入门文档05-2 使用return指示当前任务已完成
千亿IT运维市场,产品要凭实力说话
入门文档01 series按顺序执行
spark operator-wholeTextFiles operator
Getting Started Document 09 Standalone watch
spark源码-任务提交流程之-7-流程梳理总结
spark operator - map vs mapPartitions operator
OpenCV3.0 is compatible with VS2010 and VS2013
不吹不黑,这的确是我看过微服务架构最好的文章!
spark源码-任务提交流程之-3-ApplicationMaster
vim的三种模式








