zoukankan      html  css  js  c++  java
  • 计算页面尺寸收集

    function(){
    	return{
    		top:function(){return document.documentElement.scrollTop||document.body.scrollTop},
    		function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
    		height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
    		total:function(d){
    			var b=document.body, e=document.documentElement;
    			return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
    			Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
    		}
    	}
    }();
  • 相关阅读:
    省选测试29
    省选测试28
    省选测试27
    省选测试26
    省选测试25
    最小费用最大流Dinic
    省选测试24
    省选测试23
    省选测试22
    省选测试21
  • 原文地址:https://www.cnblogs.com/qqloving/p/3620834.html
Copyright © 2011-2022 走看看