欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js獲取頁面引用的css樣式表中的屬性值方法(推薦)

 更新時(shí)間:2016年08月19日 10:54:03   投稿:jingxian  
下面小編就為大家?guī)硪黄猨s獲取頁面引用的css樣式表中的屬性值方法(推薦)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧

如下所示:

function getStyle(node, property){

      if (node.style[property]) {
        return node.style[property];

      } 
      else if (node.currentStyle) {
        return node.currentStyle[property];
      } 
      else if (document.defaultView && document.defaultView.getComputedStyle) {
        var style = document.defaultView.getComputedStyle(node, null);
        return style.getPropertyValue(property);
      }

      return null;

    }

以上這篇js獲取頁面引用的css樣式表中的屬性值方法(推薦)就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論