var oDiv = document.getElementById('aa');
if(oDiv.currentStyle){
var style = oDiv.currentStyle;
  alert('ie:'+style.width) } else if(window.getComputedStyle) {
var style = window.getComputedStyle(oDiv);
alert('谷歌:'+style.width)
}

函数语法:currentStyle、getComputedStyle兼容判断的更多相关文章

  1. currentStyle getComputedStyle兼容

    function getStyle(obj,attr){ if(obj.currentStyle) {return obj.currentStyle[attr]} else{ return getCo ...

  2. 函数语法:原生js判断某个元素是否有指定的class名的几种方法

    var aLi = document.querySelectorAll('#tabs li'); for(var i = 0;i <p.length;i++){ //第一种方法,用classLi ...

  3. Linux下多进程编程之exec函数语法及使用实例

    exec函数族 1)exec函数族说明 fork()函数用于创建一个子进程,该子进程几乎复制了父进程的全部内容,但是,这个新创建的进程如何执行呢?exec函数族就提供了一个在进程中启动另一个程序执行的 ...

  4. php implode()函数 语法

    php implode()函数 语法 作用:把数组元素组合为字符串惠州大理石平板 语法:implode(separator,array) 参数: 参数 描述 separator     可选.规定数组 ...

  5. php nl2br()函数 语法

    php nl2br()函数 语法 作用:在字符串中的新行(\n)之前插入换行符dd马达 语法:nl2br(string,xhtml) 参数: 参数 描述 string 必须.规定要检查的字符串. xh ...

  6. php htmlspecialchars()函数 语法

    php htmlspecialchars()函数 语法 作用:函数把预定义的字符转换为 HTML 实体.预定义的字符有:& (和号)成为 &," (双引号)成为 " ...

  7. php htmlentities()函数 语法

    php htmlentities()函数 语法 作用:把字符转换为 HTML 实体 语法:htmlentities(string,flags,character-set,double_encode) ...

  8. php is_file()函数 语法

    php is_file()函数 语法 is_file()函数怎么用? php is_file()函数用于判断给定文件名是否为一个正常的文件,语法是bool is_file ( string $file ...

  9. case语法练习脚本之判断

    case语法练习脚本之判断 #!/bin/bash read -p "请输入一个字符,并按enter键确认:" key case "$key" in [a-z] ...

随机推荐

  1. 腾讯大数据平台Oceanus: A one-stop platform for real time stream processing powered by Apache Flink

    January 25, 2019Use Cases, Apache Flink The Big Data Team at Tencent     In recent years, the increa ...

  2. Spark-RDD之Partition源码分析

    概要 Spark RDD主要由Dependency.Partition.Partitioner组成,Partition是其中之一.一份待处理的原始数据会被按照相应的逻辑(例如jdbc和hdfs的spl ...

  3. 1 Introduction

    1. Introduction 1.1. License Flowable is distributed under the Apache V2 license. 1.2. Download http ...

  4. python处理Windows平台上路径有空格

    最近在采集windows上中间件的时候,遇到了文件路径有空格的问题. 例如:Aapche的安装路径为D:\Program Files\Apache Software Foundation\Apache ...

  5. xcode8 使用Instruments检测定位并解决iOS内存泄露

    https://www.jianshu.com/p/9bc7e65fc247 2017.07.27 17:24* 字数 628 阅读 1319评论 6喜欢 21 简介: 虽然苹果出了ARC(自动内存管 ...

  6. windows平台上用python 远程线程注入,执行shellcode

    // 转自: https://blog.csdn.net/Jailman/article/details/77573990import sys import psutil import ctypes ...

  7. Android——分割线中夹文字

    内容不多,只是感觉平时很容易遇上,那就做个笔记吧! 其实很简单,如下: <RelativeLayout android:layout_width="match_parent" ...

  8. dijstra算法

    无向图.赋权有向图 的最短路径

  9. SolidWorks 装配体及工程图

       

  10. Kali Linux 发布 2019.1 版

    Kali Linux 是一个基于 Debian 的发行版,关注于高级渗透测试和安全审计并搭载各种常用工具,由 Offensive Security 维护.后者是一个提供信息安全训练的公司. 该项目于日 ...