如何让360浏览器支持html5的window.FileReader?求解!谢谢!
if (window.FileReader) {
// var fr = new FileReader();
// add your code here
input.addEventListener("change", function (evt) {//evt
// alert(evt);
var len = this.files.length, img, reader, file;
file = this.files[0];
if (!!file.type.match(/image.*/)) {
if (window.FileReader) {
reader = new FileReader();
reader.onloadend = function (e) {
showUploadedItem(e.target.result, file.fileName);
};
reader.readAsDataURL(file);
}
}
}, false);
}
else {
alert("Not supported by your browser!");
}
Chronos
9 years, 4 months ago