while this works:
document.getElementById('xxx').style.height = 100;

This doesn't:
x=document.getElementById('xxx').style.height;

I tried to get the attributes using getAttribute but with no success.

How can I get the value of ANY attribute of an element? (not just for height)