0
why can't you use <script> tags in a external scripts
i need a fully understand about "External Script"
2 Respostas
+ 3
when you create an external script you save it by .js ext which tells the browser that its javascript. moreover< script> is used in html only.
+ 2
Because <script> is an HTML tag.
The tag <script>...</script> is used in HTML to say that the inner part must be in javascript, so you can't write HTML tags in a "script" tag and since "script" is an HTML tag you can't write it in another <script>...</script> tag (well, this seems a little confounding).
Ok, consider that when you have an external script, the code is already in a tag <script> (that you can't see), so the inner code must be in javascript language.
I hope I was useful :)