Menu Content/Inhalt
Home arrow Tutorials arrow Latest arrow Finding The Size Of Images Using Javascript
Finding The Size Of Images Using Javascript PDF Print E-mail
User Rating: / 10
PoorBest 
Written by Administrator   
Friday, 31 August 2007

If you know some javascript and some HTML then you can go forward....Those who need explanations plz feel free to mail me to This e-mail address is being protected from spam bots, you need JavaScript enabled to view it or This e-mail address is being protected from spam bots, you need JavaScript enabled to view it or This e-mail address is being protected from spam bots, you need JavaScript enabled to view it  



<script language='JavaScript'>
function getImgSize(imgSrc)
{
var newImg = new Image();
newImg.src = imgSrc;
var height = newImg.height;
var width = newImg.width;
alert ('The image size is '+width+'*'+height);
}
</script>

<IMG id='demoImg' src="1.jpg">
<BUTTON onclick="getImgSize(document.getElementById('demoImg').src);" value="Click Me">

Last Updated ( Sunday, 02 September 2007 )
 
< Prev   Next >

Newsflash

Welcome to tutorials.c-o.in.....the website that gives you tutorialz on php,mysql,webservice etc..