zoukankan      html  css  js  c++  java
  • 自定义函数

    //跨浏览器的方法

    var leftX = (typeof screenLeft == 'number') ? screenLeft : screenX;
    var topY = (typeof screenTop == 'number') ? screenTop : screenY;

    //可视窗口的宽和高

    var width = window.innerWidth; //这里要加window,因为IE 会无效
    var height = window.innerHeight;
    if (typeof width != 'number') { //如果是IE,就使用document
    if (document.compatMode == 'CSS1Compat') {
    width = document.documentElement.clientWidth;
    height = document.documentElement.clientHeight;
    } else {
    width = document.body.clientWidth; //非标准模式使用body
    height = document.body.clientHeight;
    }
    }
    本人无商业用途,仅仅是学习做个笔记,特别鸣谢小马哥,学习了IOS,另日语学习内容有需要文本和音频请关注公众号:riyuxuexishuji
  • 相关阅读:
    spring4-2-bean配置-2-属性注入细节
    内存管理tcmalloc
    并发视频,怎么hold住高并发
    struts总结
    最近想玩的一个方向
    虚拟化技术漫谈
    陈硕的博客
    木铎
    安全编程资源-苹果
    POOL
  • 原文地址:https://www.cnblogs.com/laugh/p/4364067.html
Copyright © 2011-2022 走看看