zoukankan      html  css  js  c++  java
  • javascript获得浏览器工作区域的大小

    浏览器的窗口发生变化时会执行window.onresize方法,通过这个方法我们可以获得到浏览器工作区域的大小:

    1 window.onresize=function(){ 
    2     bodyHeight = window.innerHeight?(window.innerHeight<600?600:window.innerHeight):document.documentElement.clientHeight;
    3     bodyWidth = window.innerWidth?window.innerWidth:document.body.offsetWidth;
    4 };
  • 相关阅读:
    swift
    swift
    swift
    swift
    swift
    swift
    swift
    选择排序
    组合 和 继承
    Android中使用LitePal操控SQLite数据库
  • 原文地址:https://www.cnblogs.com/smallrock/p/3656935.html
Copyright © 2011-2022 走看看