📌  相关文章
📜  未捕获的类型错误:无法读取未定义的属性“addEventListener” - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:06.082000             🧑  作者: Mango

代码示例1
1)Check you placed .before the class
Example:
document.getElementsByClassName('.yourclassname') //.before class name is wrong
the code should be document.getElementsByClassName('yourclassname');
2)Check the spelling for addEventListener 
///dont feel embrassed because i always do these mistakes eventhough i used this property it 10000 times