zoukankan      html  css  js  c++  java
  • javascript页面参数问题

       this.context=new Object();
          documentParameter.getRectangle=function (){
                                if(window.innerWidth){
                                   return [window.innerWidth,window.innerHeight];
                                }
                                else{
                                      if(document.compatMode=="CSS1Compat"){
                                           return [document.documentElement.clientWidth,document.documentElement.clientHeight];
                                      }
                                      else{
                                           return [document.body.clientWidth,document.body.clientHeight];
                                      }
                                }
                             }
         
         documentParameter.getWidth() =function(){
                              var w=this.getRectangle();
                              return w[0];
                          }
         this.getHeigt() =function(){
                              var h=this.getRectangle();
                              return h[1];
                          }
        }
        var s =new documentParameter();
        alert(s.getWidth());
  • 相关阅读:
    hadoop安装前的准备
    记录一次Qt5程序无法运行的解决过程
    C#里的Thread.Join与Control.Invoke死锁情况
    qbxt7月笔记
    zhxのDP讲
    有n*m的方格图
    最长上升子序列相关问题笔记
    qbxt游记(清北澡堂划水记
    DAZの七下道法(持续更新
    模板
  • 原文地址:https://www.cnblogs.com/swneng/p/1301010.html
Copyright © 2011-2022 走看看