On the error of cannot read property ‘xxx’ of null in JS

Cannotreadproperty'firstChild'ofnull

When debugging the page, there was such an error. The search found that this error occurred before the page was loaded when JS was loaded. The solution is very simple. Put this section of JS at the bottom of the page, and then load this section of JS when the page is loaded. Make a brief note

Success comes from diligence

Similar Posts: