使用jQuery文件流读取文件

it2022-05-05  170

1 if (FileReader) { 2 var reader = new FileReader(), file = this.files[0]; 3 reader.onload = function (e) { 4 $("#userImage").attr("src", e.target.result); 5 $("#smallImg").attr("src", e.target.result); 6 }; 7 reader.readAsDataURL(file); 8 }

 

转载于:https://www.cnblogs.com/sunnypron/p/5422292.html

相关资源:Ajax发送和接收二进制字节流数据的方法

最新回复(0)