移动端图片操作(二)——预览、旋转、合成

在上一节中已经提到了预览,预览可以通过data: URL格式或URL对象。 var file = upload.files[0]; //URL对象 var url = URL.createObjectURL(file); var img = new Image(); img.style.width = '100%'; img.src = url; img.onload = function(e)
相关文章
相关标签/搜索