Screen 对象 window.screen 对象包含有关客户端显示屏幕的信息。 注释:没有应用于 screen 对象的公开标准,不过所有浏览器都支持该对象。 window.screen 对象在编写时可以不使用 window 这个前缀。 一些属性: screen.availWidth - 可用的屏 ...
分类:
编程语言 时间:
2017-08-17 10:51:38
阅读次数:
1144
<script> function move(keynum) { //获取屏幕宽度 var w=screen.availWidth; //获取屏幕高度 var h=screen.availHeight var d = document.getElementById("dv"); //创建随机数,也就 ...
分类:
移动开发 时间:
2017-07-05 13:20:49
阅读次数:
182
屏幕分辨率的宽高:window.screen.width / window.screen.height 屏幕可用工作区宽高:window.screen.availWidth / window.screen.availHeight 网页可见区域宽高:document.body.clientWidth ...
分类:
Web程序 时间:
2017-06-27 20:54:45
阅读次数:
190
document.write("屏幕分辨率为:"+screen.width+"*"+screen.height+"<br />"+"屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight+"<br />"+"网页可见区域宽:"+document.body. ...
分类:
Web程序 时间:
2017-06-26 17:16:44
阅读次数:
299
/* * screen对象 */ console.log(screen.width);// 屏幕宽度 console.log(screen.height);// 屏幕高度 console.log(screen.availWidth); //可用宽度 console.log(screen.availH ...
分类:
其他好文 时间:
2017-04-17 00:32:57
阅读次数:
229
一.bom对象 1screen对象 console.log(screen.width);// 屏幕宽度 console.log(screen.height);// 屏幕高度 console.log(screen.availWidth); //可用宽度 console.log(screen.avail ...
分类:
Web程序 时间:
2017-04-16 13:22:07
阅读次数:
229
document.write( "屏幕分辨率为:"+screen.width+"*"+screen.height +""+ "屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight +""+ "网页可见区域宽:"+document.body.clientW... ...
分类:
其他好文 时间:
2017-04-10 21:18:28
阅读次数:
181
(一)screen对象,Screen 对象中存放着有关显示浏览器屏幕的信息。 常见的属性有: availHeight:返回显示屏幕的高度 availWidth:返回显示屏幕的宽度 colorDepth:返回目标设备或缓冲器上的调色板的比特深度。 height:返回屏幕区域的实际高度 width:返回 ...
分类:
其他好文 时间:
2017-03-11 23:27:16
阅读次数:
186
Window对象属性ScreenLeft/ScreenTop/ScreenX/ScreenY只读整数,声明了窗口的左上角在屏幕上的x坐标和y坐标。IE、Safari和Opera支持ScreenLeft/ScreenTopFirefox、Safari支持ScreenX/ScreenYChrome都支持innerWidth/innerHeight只读属性,声明了窗口的文档显示区的宽度和高度,..
分类:
其他好文 时间:
2016-12-19 14:52:13
阅读次数:
305
关于clientHeight、offsetHeight、scrollHeight window.screen.availWidth 返回当前屏幕宽度(空白空间) window.screen.availHeight 返回当前屏幕高度(空白空间) window.screen.width 返回当前屏幕宽度 ...
分类:
其他好文 时间:
2016-11-30 22:35:48
阅读次数:
163