search

Home  >  Q&A  >  body text

如何让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!");
}  
阿神阿神2784 days ago1293

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-17 11:49:06

    360 Browser now has two modes, speed mode and compatibility mode. Speed ​​mode should support HTML5 better.

    reply
    0
  • Cancelreply