Why is document.body null in my javascript?

前端 未结 6 2017
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 05:50

Here is my brief HTML document.

Why is Chrome Console noting this error:

\"Uncaught TypeError: Cannot call method \'appendChild\' of nul

6条回答
  •  Happy的楠姐
    2020-11-28 06:38

    Or add this part

    
    

    after the HTML, like:

        
        ...
        ...
       
    
        
    

提交回复
热议问题