Hello Everyone;
I`m Beginner Javascript Developer and I Have a small problem with parseInt method
the code is below:
<script type="text/javascript">
window.onload = Rectangle;
function Rectangle () {
var e = document.getElementById('Rectanglee');
var w =parseInt(e.style.width);
var h =parseInt(e.style.height);
alert (w);
alert (h);
}
</script>
the code is supposed to alert the actual width and the height of the element with specified id according to its CSS rule , however a NaN alert is popup
can you plz tell me where could be the problem???
thank you in advance :)