js

2017-12-08  本文已影响0人  大硕_5132

## 获取css设置的元素样式的方法

chrome FF

vardiv=document.getElementById("id")

window.getComputedStyle(div).fontSize

IE

vardiv= document.getElementById("id");

div.currentStyle['font-size'];

上一篇 下一篇

猜你喜欢

热点阅读