解决Ie不兼容NodeList forEach

NodeList.prototype.forEach = NodeList.prototype.forEach || function (callback) {
  for(let i = 0; i < this.length; i++){
    callback.call(this[i],this[i],i)
  }
};

 

posted @ 2018-09-07 13:18  triz  阅读(213)  评论(0编辑  收藏  举报