Attributes、Properties 异同、文件读取、promise、async 的一些问题

1.Attributes、Properties 异同 https://www.jianshu.com/p/cbf1667c7ba2
  attributes 属于 HTML。为了易于区别,我们译为特性。
  properties 属于 DOM,译为属性,而在 JavaScript 中我们操作 HTML 时使用的就是 DOM。
2.读取文件代码 https://www.cnblogs.com/hhhyaaon/p/5929492.html
  var input = document.getElementById("file"); //input file
  input.onchange = function(){
  var file = this.files[0];
  if(!!file){
  //读取本地文件,以gbk编码方式输出
    var reader = new FileReader();
    reader.readAsText(file,"gbk");
    reader.onload = function(){
    //读取完毕后输出结果
    console.log(this.result);
      }
    }
  }

ht for web
promise一些问题https://www.cnblogs.com/sweeeper/p/8442613.html
async 一些问题 https://www.cnblogs.com/SamWeb/p/8417940.html

原文地址:https://www.cnblogs.com/ybhome/p/11693420.html