标签:style blog io color ar java sp div on
function getStyle(el){ if(window.getComputedStyle){ return window.getComputedStyle(el,null); } return el.currentStyle; } function getStyleValue(el, name){ var style = getStyle(el); return style[name]; } console.log(getStyle(document.body)); console.log(getStyleValue(document.body, "backgroundImage"));
标签:style blog io color ar java sp div on
原文地址:http://www.cnblogs.com/rubekid/p/4059359.html