开发者

Getting size, height and width of an image? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_C百科

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 3 years ago.

Improve this question

How can I get the size, height and width of an image in when upload it with jQuery?


if you use jquery uploadify plugin then you can find the file size by any one of these following method

'onSelect': function(event, ID, fileObj) {
    console.log(fileObj.size);
}

OR,

'onComplete': function(event, ID, fileObj, response, data) {
    console.log(fileObj.size);
}

and use

$('img').css('width');
$('img').css('height');


$("#imgId").css('width')
$("#imgId").css('height')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜