Having Script within a Script Src tag? valid? My guess would be no, but why? Edit: ah, found it, only in XHTML in compatible browsers. Still don't get *why* though.. – DZittersteyn Aug 29 '12 at 16:25

1

In the first example you define the src which makes it IGNORE the contents of the <script></script>

In the 2nd example you have 2 separate <script></script> tags, the 2nd of which is housing your code to execute.

Jakub
  • 20,418
  • 8
  • 65
  • 92