As shown below:
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; }The above article JS obtains the attribute value method (recommended) in the css style sheet referenced on the page is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.