Reputation: 114136
In HTML, are <script>
elements allowed to be external and use <script src="myscript.js">
even when in the <body>
of the document?
Upvotes: 3
Views: 289
Reputation: 4866
Yes. This is how a lot of widgets work like Google Maps. Make sure you specify the type though:
<script type="text/javascript" src="action.js"></script>
Upvotes: 11