<script language="javascript" type="text/javascript">
/*将获取的值存到变量里*/
width_screen=screen.width
height_screen=screen.height
availWidth_screen=screen.availWidth
availHeight_screen=screen.availHeight
colorDepth_screen=screen.colorDepth
/*end*/
/*输出值*/
document.write("你的屏幕宽为:"+width_screen+"<br />你的屏幕高为:"+height_screen+"<br />你的屏幕可用宽为:"+availWidth_screen+"<br />你的屏幕可用高为:"+availHeight_screen+"<br />你的颜色设置所有为数为:"+colorDepth_screen)
/*end*/
</script>
width_screen=screen.width // 获取宽度height_screen=screen.height 高度
availWidth_screen=screen.availWidth
availHeight_screen=screen.availHeight
colorDepth_screen=screen.colorDepth
如果是动态获取的话,就自己写一个方法什么的给封装一下,然后加载。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)