Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/hua_ban_yu/article/details/82799280
Calculated using the content of offsetHeight highly Times Uncaught TypeError: Can not read property 'offsetHeight' of null error.
Cause: JS run when the page has not finished loading, js code that can not find a page element, it will throw this question
Solution: The custom js on the <body /> tag before the end.