源自:4-1 无限滚动
Uncaught TypeError: Cannot set property 'className' of undefined 为什么呀?我的buttons
定义没有问题呀?怎么修改呀?
提问者:qq_siblings_0
2017-08-06 22:52
个回答
-
嗯,是没有获取buttons的原因。我也遇到过这个问题。
-
这是因为你没有先获取buttons,检查一下你前面有没有
var buttons = document.getElementById('buttons');