Does javascript have to be in the head tags?

后端 未结 11 701
逝去的感伤
逝去的感伤 2020-11-27 03:46

I believe javascript can be anywhere (almost), but I almost always see it in between . I am using jquery and wanted to know if it has

11条回答
  •  Happy的楠姐
    2020-11-27 04:21

    No, it can be anywhere. In fact, it’s sometimes a good idea to put it at the bottom of the document. For an explanation why, see http://developer.yahoo.com/performance/rules.html#js_bottom.

提交回复
热议问题