Are HTML script elements available as external, even if they are in the body?

In HTML, elements are <script>allowed for external and use <script src="myscript.js">, even if in a <body>document?

+3
source share
1 answer

Yes. Here's how a lot of widgets work like Google Maps. Make sure you specify the type:

<script type="text/javascript" src="action.js"></script>
+11
source

Source: https://habr.com/ru/post/1709360/


All Articles