//填充预览图片 function adpter(file, upfile) { var imgName = new Date().getTime() + file.name.substr(file.name.lastIndexOf('.')); if (file) { if (file.type.indexOf('image') == 0) { var reader = new FileReader(); reader.onload = function (e) { var image1 = new Image(); image1.src = e.target.result;
//实际大小 alert(image1.width+","+image1.height); $("#showImg").attr('src', e.target.result); initjcrop(); }; reader.readAsDataURL(file); } else { alert('err') } } }