Close HTML Script Tag

vassdoki

New Member
I just curious why my JavaScript can't run (tested in Firefox and IE) if I write the \[code\]<script>\[/code\] tag like this:\[code\]<script type="text/javascript" src="http://stackoverflow.com/questions/15897413/script.js"/>\[/code\]It will work if I change that line to:\[code\]<script type="text/javascript" src="http://stackoverflow.com/questions/15897413/script.js"></script>\[/code\]So my question is: why I can't close the \[code\]script\[/code\] tag in the start tag since I don't have any content inside it.My JavaScript code is simple, just:\[code\]alert("test");\[/code\]Notes: I check firefox error console and no error.
 
Top