JavaScript src with empty tag works, with empty end doesn't [duplicate]
Possible Duplicate:
Why don't self-closing script tags work?
I am using Spring web-mvc with F开发者_开发百科reemarker and JQuery. The following works fine (layout, positioning etc):
<script type="text/javascript" src="<@spring.url 'jquery.ui.core.js'/>"></script>
But this doesn't:
<script type="text/javascript" src="<@spring.url 'jquery.ui.core.js'/>"/>
What's going wrong?
Nothing is wrong, script tags just require the closing tags, they can't be self closed.
More discussion about it available on this thread: Why don't self-closing script tags work?
You can't close a script tag using '/>' you have to use the explicit '</script>' closing tag.
精彩评论