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'];
## 获取css设置的元素样式的方法
chrome FF
vardiv=document.getElementById("id")
window.getComputedStyle(div).fontSize
IE
vardiv= document.getElementById("id");
div.currentStyle['font-size'];