Cannot read property 'getElementsByTagName' of null解决办法

来源:互联网 发布:app数据分析网站 编辑:程序博客网 时间:2024/06/01 10:43

在调试js代码时候遇到Cannot read property 'getElementsByTagName' of null错误。




原因是使用x.getElementsByTagName需要给x添加一个id。

原创粉丝点击