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());
  • 相关阅读:
    HTTP的GET和POST请求
    移动开发平台性能比較
    Struts2之类型转换器的使用
    对Socket CAN的理解(4)——【Socket CAN接收数据流程】
    当罗密欧遇到朱丽叶... ...当指针遇到数组
    Qt的Script、Quick、QML的关系与总结
    nyoj27水池数目 (DFS)
    HBase行锁原理及实现
    poj1852ant
    JSTL&EL表达式
  • 原文地址:https://www.cnblogs.com/swneng/p/1301010.html
Copyright © 2011-2022 走看看