“Cannot read property 'classList' of null” when using classList.add
代码
document.geyElementById('nonexisting').classList.add('foo')
报错
“Cannot read property 'classList' of null” when using classList.add
原因
没有 document.geyElementById('nonexisting') nonexisting 不存在
解决办法 增加 nonexisting id属性
“Cannot read property 'classList' of null” when using classList.add相关推荐
- Cannot read property 'nodeType' of null; audio元素默认样式下载按钮
1.chrome-->console抛出如下错误: Uncaught TypeError: Cannot read property 'nodeType' of null 错误原因:从stack ...
- 删除数据 DataIntegrityViolationException: not-null property references a null or transient value解决...
今天在做删除某一个数据时 使用hibernate的getHiberbnateTemplate().delete(entity)时,报以下错误 javax.servlet.ServletExceptio ...
- echarts Cannot read property ‘getAttribute‘ of null 问题的解决方法
echarts Cannot read property 'getAttribute' of null 问题的解决方法 参考文章: (1)echarts Cannot read property 'g ...
- Uncaught TypeError: Cannot read property 'setAttribute' of null
Uncaught TypeError: Cannot read property 'setAttribute' of null 其实就是js中空指针异常 h5splayer.js:1 Uncaught ...
- 项目中遇到Cannot read property 'length' of null
错误页面: 本人遇到的这个错误的原因主要是后台返回给页面的数据错误,没有数据时我返回给前台页面的是null,所以这个时候前台就会报这个Cannot read property 'length' of ...
- Vue+G2:Please specify the container for the chart! + Cannot read property ‘appendChild‘ of null
研究了一下午,终于搞懂了是为啥. 先看一下代码,两个tab标签页,其中一个放chart的挂在节点,但是初始化的时候一直报两个错. <a-tabs default-active-key=" ...
- Uncaught TypeError: Cannot read property 'value'' of null
在用JS实现ajax做网页聊天室的时候,报了一个错误: Uncaught TypeError: Cannot read property 'value'' of null at chat (Gluti ...
- hibernate异常:not-null property references a null or transient value
http://blog.163.com/xiexueyong1987@126/blog/static/1262673422009106103128236/ 调用delete()时,出现Property ...
- Uncaught TypeError: Cannot read property 'length' of null错误怎么处理?
Uncaught TypeError: Cannot read property 'length' of null 错误怎么处理? 1.可能是返回的datagrid数据格式有问题,比如{"t ...
最新文章
- 解决在SQL Server 2000的存储过程不能调试
- 关于《指针的艺术》看书时所遇到的问题
- metasploit 快速入门(三) 服务端漏洞利用
- 我的个人小站,欢迎大家吐槽
- 在每天下午5点使用计算机时,网络信息安全知识网络竞赛试题(附答案)讲解学习...
- python jieba库用法
- java图片压缩不失真_软件分享 | Lit图片压缩
- java识别系统_[Java教程]Java识别操作系统
- python list清理列表中的空元素或特定元素
- 普通账户信息是SIEM的盲点
- PHP获取随机字符串的两种方法
- Go语言栈定义及相关方法实现
- HSQL转换成MapReduce过程
- linux命令unzip,linux unzip命令参数及用法详解--linux解压zip文件命令
- Android_JNI编程入门
- LOAP引擎:clickhouse06:简单介绍几个JSON函数
- 74HC573并联输出
- 小程序如何开通流量主
- const、*、的大乱斗
- 关于投资有哪些不得不读的书籍?