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());

相关文章:

  • 2021-08-03
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2022-02-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案