Since the mapping is not set directly as a property of the style, you will not get this using the above code. You should get the calculated value.
You can link to this page. Get styles.
To get the value
var displayValue = getStyle("test", "display"); function getStyle(el,styleProp) { var x = document.getElementById(el); if (x.currentStyle) var y = x.currentStyle[styleProp]; else if (window.getComputedStyle) var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); return y; }
rahul
source share