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());
  • 相关阅读:
    pgsql查询优化之模糊查询
    两款不同应用场景的Wpf分页控件
    C# 客户端程序调用外部程序的三种实现
    WPF DataGrid自动生成序号
    WPF控件自适应屏幕
    NOPI实现导入导出泛型List,支持自定义列
    WPF蒙板弹窗
    定时发送邮件
    数据库基础知识介绍(MySQL)
    动态数据透视表
  • 原文地址:https://www.cnblogs.com/swneng/p/1301010.html
Copyright © 2011-2022 走看看