JS 获取屏幕的宽度和高度,各种方式
Javascript:
网页可见区域宽: document.body.clientWidth
网页可见区域高: document.body.clientHeight
网页可见区域宽: document.body.offsetWidth (包括边线的宽)
网页可见区域高: document.body.offsetHeight (包括边线的高)
网页正文全文宽: document.body.scrollWidth
网页正文全文高: document.body.scrollHeight
网页被卷去的高: document.body.scrollTop
网页被卷去的左: document.body.scrollLeft
网页正文部分上: window.screenTop
网页正文部分左: window.screenLeft
屏幕分辨率的高: window.screen.height
屏幕分辨率的宽: window.screen.width
屏幕可用工作区高度: window.screen.availHeight
屏幕可用工作区宽度: window.screen.availWidth
JS 获取屏幕的宽度和高度,各种方式的更多相关文章
- JS获取屏幕,浏览器窗口大小,网页高度宽度(实现代码)_javascript技巧_
JS获取屏幕,浏览器窗口大小,网页高度宽度(实现代码)_javascript技巧_--HTML5中文学习网 http://www.html5cn.com.cn/shili/javascripts/79 ...
- android之获取屏幕的宽度和高度
获取屏幕的宽度和高度: 方法一: //获取屏幕的宽度 public static int getScreenWidth(Context context) { WindowManager manager ...
- Java 获取屏幕的宽度和高度
获取屏幕的宽度和高度 1 import java.awt.Dimension; 2 import java.awt.Toolkit; 3 4 public class Main { 5 6 publi ...
- JS,JQuery各种获取屏幕的宽度和高度
JQuery: $(document).ready(function(){ alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).h ...
- JS,Jquery获取屏幕的宽度和高度
Javascript: 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.b ...
- Android获取屏幕的宽度和高度(dp)
public void getAndroiodScreenProperty() { WindowManager wm = (WindowManager) this.getSystemService(C ...
- C#获取屏幕的宽度和高度
//1.在屏幕的右下角显示窗体 //这个区域不包括任务栏的 Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this ...
- react native获取屏幕的宽度和高度
var Dimensions = require('Dimensions'); var {width,height} = Dimensions.get("window");//第一 ...
- js获取上传图片大小,判断上传图片类型,获取图片真实宽度和高度
html部分 <div class="form-group col-md-12"> <label class="col-md-2 text-right& ...
随机推荐
- 【转】UGUI研究院之缓存策略让UI打开更快(三十)
UGUI研究院之缓存策略让UI打开更快(三十) [投稿]Unity3D游戏优化之头顶UI 注意里面提到了:SuperTextMesh:能渲染动态文字,富文本支持图文混排,缺点是支持atlas但很弱,资 ...
- Easy-to-Learn English Travel Phrases and Vocabulary!
Easy-to-Learn English Travel Phrases and Vocabulary! Share Tweet Share Tagged With: Real Life Englis ...
- 讲一讲Servlet和JSP的关系
Test.jsp在运行时首先被解析成一个java类Test_jsp.java,该类继承于org.apache.jasper.runtime.HtppJspBase类,而Http又是继承HttpServ ...
- 【剑指offer】将字符串中的空格替换成"%20"
#include <iostream> #include <string> using namespace std; char *ReplaceSpace(char *str, ...
- svn的上传冲突问题
上传报错实际是 1 . 之前上传的代码与现代码不一样 2. 上传的代码中有错误 需要先拉下来,对比删除不要的,再上传 eclipse加入svn : 1.import ---从svn检出项目---创 ...
- Hibernate 再接触 ID生成策略
Xml 方法 在student.hbm.xml中 <generator class="uuid"></generator> 取值如下 1.identity: ...
- 安装eclipse版本oxygen,及maven导入spring mvc项目并运行
本文地址为:http://www.cnblogs.com/jying/p/7511598.html 系统环境: win10 eclipse版本:2017.09.11 官网下载版本号为 oxygen 1 ...
- HttpWatch Professional Edition 7.2.13下载含( license.lic )
下载地址: http://download.httpwatch.com/httpwatchpro.exe httpwatch.lic # program. # # You ca ...
- SpringBoot SpringSession redis SESSION
号称无缝整合httpsession 共享, 但注意如果存在第三方框架,例如SESSION并发控制,这个是需要自己重写session名单的. 关于redis session 共享 的session并发控 ...
- pring Boot 与Spring Cloud版本对应
Spring Boot Spring Cloud 1.2.x Angel版本 1.3.x Brixton版本 1.4.x Camden版本 1.5.x Dalston版本.Edgware版本 2.0. ...