SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input class="fileInput" type="file">
  
</body>
<script>
      
    $(".fileInput").change(function(){
      let file = this.files[0];
      let reader = new FileReader();
      reader.onload = ()=> {
        let binary = "";
        let bytes = new Uint8Array(reader.result);
        for (let i = 0; i < bytes.byteLength; i++) {
          binary += String.fromCharCode(bytes[i]);
        }
        let wb = XLSX.read(binary, {
          type: "binary"
        });
        let outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
        console.log(outdata);
      };
      reader.readAsArrayBuffer(file);
    })
</script>
</html>

本项目引用的自定义外部资源