What's the difference between putting script in head and body?

后端 未结 9 977
花落未央
花落未央 2020-12-04 12:15

I was getting a problem .


  

        
9条回答
  •  再見小時候
    2020-12-04 12:47

    Head will get rendered before Body. If you're trying to access your li tags in the head, the obvious answer is that they are not created until the browser renders the body section and therefore cannot be referenced.

提交回复
热议问题