开发者

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

开发者 https://www.devze.com 2023-03-22 05:43 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers.开发者_C百科
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

精彩评论

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