我得到了错误的反馈: jdnav2.js:9 Uncaught TypeError: Cannot read property 'offsetHeight' of undefined
跟老师写得一模一样,不知道哪里出问题了? 另外element.style.top的单位是“px",怎么能和结果为数值类型的element.offsetHeight相加呢? 求解答,求帮助!
这是错误反馈和代码