In HTML, are the <script>
elements allowed to be external and use <script src="myscript.js">
even when in the <body>
of the document?
views:
112answers:
1
+8
A:
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>
Matthew James Taylor
2009-05-29 05:51:31
I thought you should specify the type even for scripts in the head section. Or is it somehow special for scripts inside the body?
dasha salo
2009-05-29 05:56:48
You should always specify the type :)
Matthew James Taylor
2009-05-29 05:58:58