今天在项目中遇到个问题如下:
vue项目中public的index.html文件script标签引入了一个外部的js文件,里面有一个方法
每次调用的时候都会报错Uncaught TypeError: Cannot read property ‘addEventListener‘ of null,网上查的所有办法都试过了:跟标签摆放先后位置,放到onload方法中都没关系
有没有哪位知道还有可能存在什么问题,感激不尽!!!!!!!!!!!
- addEventListener TypeError Uncaught property Cannotaddeventlistener typeerror uncaught property properties typeerror undefined uncaught typeerror undefined uncaught property properties typeerror reading cannot emitsoptions properties typeerror uncaught typeerror undefined property cannot insertadjacenthtml typeerror uncaught property resetupscroll typeerror property cannot javascript typeerror uncaught function typeerror countable uncaught argument