博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
javascript 之 浏览器宽度、高度总结
阅读量:4599 次
发布时间:2019-06-09

本文共 447 字,大约阅读时间需要 1 分钟。

//alert(window.screen.availHeight );//ie可见高度        

//firefox的整个浏览器的高度(包括工具栏)      

//alert(document.body.scrollHeight );//ie 的所有高度  //firefox的可见高度     

//alert(document.documentElement.scrollTop);//ie,firefox 被隐藏的高度     

//alert(document.documentElement.scrollHeight);//firefox,ie的所有高度     

alert(document.documentElement.scrollWidth);//ie,firefox的所有宽度     

alert(document.body.scrollWidth);//ie,firefox的可见宽度

转载于:https://www.cnblogs.com/silentjesse/archive/2011/11/10/2244315.html

你可能感兴趣的文章
JavaScript空判断
查看>>
洛谷 P1439 【模板】最长公共子序列(DP,LIS?)
查看>>
python timeit
查看>>
Wireless Network 并查集
查看>>
51nod 1019 逆序数
查看>>
20145202马超《JAVA》预备作业1
查看>>
云推送注意(MSDN链接)
查看>>
IDEA 生成 jar 包
查看>>
加减乘除混合版
查看>>
linux基础6-bash shell编程
查看>>
掌握这几种微服务模式助你成为更出色的工程师
查看>>
为什么很多语言选择在JVM上实现
查看>>
绘制dot 图
查看>>
CSS Reset CSS Framework
查看>>
如何用WinCC发送报警消息至微信
查看>>
LeetCode算法扫题系列19
查看>>
nginx获取经过层层代理后的客户端真实IP(使用正则匹配)
查看>>
YII实现dropDownList 联动事件
查看>>
搞定PHP面试 - 正则表达式知识点整理
查看>>
为什么JavaScript里面0.1+0.2 === 0.3是false
查看>>