echarts Cannot read property 'getAttribute' of null 问题的解决方法

2023-05-25,,

今天在使用echarts练习官方给的实例的时候,代码没有问题 却总是报错“Cannot read property 'getAttribute' of null”

找了好久的文档没有看明白 。。。

最后终于发现造成这种错误的原因是 echarts.js引用放在head中或者放在body中HTML代码的前面了,造成加载时阻塞后面的html。

解决方法很简单 就是 不要把echarts.js放在head中   只要将其放在</body>之前就可以了

问题解决

echarts Cannot read property 'getAttribute' of null 问题的解决方法的相关教程结束。

《echarts Cannot read property 'getAttribute' of null 问题的解决方法.doc》

下载本文的Word格式文档,以方便收藏与打印。