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());
  • 相关阅读:
    VC常用代码
    richedit
    vc++ 2005 发布程序
    管道应用之捕获控制台程序信息
    黑客基础知识编程(转)
    Get All IE Info from win32 api
    vc 界面编程常用方法(http://blog.emuch.net/244485/spacelistblogitemtypeid2708.html)
    使用ADO调用存储过程
    在C#中如何实现文件夹的复制(转)
    C语言开发病毒程序(转)
  • 原文地址:https://www.cnblogs.com/swneng/p/1301010.html
Copyright © 2011-2022 走看看