使用UPLOADIFY插件上传完成后获取上传图像的宽度
我想在uploadify中完成上传后获取图像的宽度,然后在上传之前使比例与上一个比例正确
FOCUS:获取上传图片的宽度
//所有文件上传完成后
'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) { } });