get imagesize javascript

by Ramya 2010-03-09 14:41:19

get image size javascript:

To get image size in javascript use the following format:
var newImg = new Image();
newImg.src = imgSrc; //specify the image source
var height = newImg.height;
var width = newImg.width;
alert(width+"*"+height);

Tagged in:

1037
like
0
dislike
0
mail
flag

You must LOGIN to add comments