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 }
时间: 2024-11-07 04:27:11