我是靠谱客的博主 清秀小兔子,这篇文章主要介绍js获取页面引用的css样式表中的属性值方法(推荐),现在分享给大家,希望可以做个参考。

如下所示:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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样式表中的属性值方法(推荐)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

最后

以上就是清秀小兔子最近收集整理的关于js获取页面引用的css样式表中的属性值方法(推荐)的全部内容,更多相关js获取页面引用内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(145)

评论列表共有 0 条评论

立即
投稿
返回
顶部