Uncaught TypeError: Cannot read property 'style' of null
生活随笔
收集整理的這篇文章主要介紹了
Uncaught TypeError: Cannot read property 'style' of null
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
報錯代碼部分:
就是因為這個屬性margin-top
必須用雙等號的關系來寫,代碼如下:
tophead.style.margin-top == ‘0’;
總結
以上是生活随笔為你收集整理的Uncaught TypeError: Cannot read property 'style' of null的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在html中引入jQuery包的方法
- 下一篇: js基础--获取浏览器当前页面的滚动条高