Jump to content

[SOLVED] getting real height/width


taith

Recommended Posts

anyone know how to get the real height/width of something? width/height in px?

 

<span id=test style="border:1px solid black;height:50%;">df</span>
<script>
var ie4=false;
if(document.all) ie4=true;

function getObject(id){
if(ie4) return document.all[id];
else return document.getElementById(id);
}

alert(getObject('test').style.height);
</script>

Link to comment
https://forums.phpfreaks.com/topic/87414-solved-getting-real-heightwidth/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.