for…of 和 for…in 在 typescipt 下会出现问题
解决方法
var list = document.getElementsByClassName("events");
for (var i = 0; i < list.length; i++) {
console.log(list[i].id); //second console output
}
https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements