当前位置:网站首页>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();})边栏推荐
- spark源码-任务提交流程之-4-container中启动executor
- spark operator - map vs mapPartitions operator
- 静态路由
- lvm logical volume and disk quota
- 解决这三大问题,运维效率将超90%的医院
- 【Day6】文件系统权限管理 文件特殊权限 隐藏属性
- spark源码-任务提交流程之-2-YarnClusterApplication
- CIPU,对云计算产业有什么影响
- I217-V network disconnection problem in large traffic under openwrt soft routing
- ROS video tutorial
猜你喜欢
随机推荐
【Day8】(超详细步骤)使用LVM扩容
The spark operator - repartition operator
云计算——osi七层与TCP\IP协议
VRRP principle and command
Getting Started 04 When a task depends on another task, it needs to be executed in sequence
入门文档12 webserve + 热更新
入门文档04 一个任务依赖另外一个任务时,需要按顺序执行
【Day8】Knowledge about disk and disk partition
Spark source code - task submission process - 4-container to start executor
Why can't I add a new hard disk to scan?How to solve?
入门文档06 向流(stream)中添加文件
ACL 和NAT
腾讯云消息队列CMQ
增长:IT运维发展趋势报告
新一代解析技术——云解析
spark operator-parallelize operator
[Day8] Commands involved in using LVM to expand
I/O性能与可靠性
VLAN details and experiments
spark source code-RPC communication mechanism









