document.getElementById(\'myId\').style;
is one way of accessing the style attribute.. Also we can do the same using document.getElementById
document.getElementById
getAttribute will return the value of non-standard attributes as well as standard ones.
getAttribute
Object property notation will not, since non-standard attributes aren't converted to properties.
...