使用UPLOADIFY插件上传完成后获取上传图像的宽度 [英] Get Width of Uploaded image when upload complete using UPLOADIFY Plugin
本文介绍了使用UPLOADIFY插件上传完成后获取上传图像的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在uploadify中完成上传后获取图片的宽度,然后在上传之前使比例与之前的比例相符
I want to get the width of an image when upload complete in uploadify and then make make the proportion correct with the previous one before upload
FOCUS: 获取上传图片的 WIDTH
FOCUS: get the WIDTH of the uploaded image
推荐答案
//当所有文件上传完毕后
//when all files finished uploading
'onAllComplete' : function(event,data) {
alert("action");
}
//文件上传时
'onComplete' : function(event, ID, fileObj, response, data) {
alert('There are ' + data.fileCount + ' files remaining in the queue.');
}
尝试
$("#imgID").css("width");
或
$("#imgID").width()
它看起来像
$('#file_upload').uploadify({
$imgThis=$(this);
alert($imgThis.width());
'onComplete' : function(event, ID, fileObj, response, data) {
}
});
这篇关于使用UPLOADIFY插件上传完成后获取上传图像的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文