0

Possible Duplicate:
Why don't self-closing script tags work?

I am using Spring web-mvc with Freemarker 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?

Community
  • 1
  • 1
Paul McKenzie
  • 19,646
  • 25
  • 76
  • 120
  • 1
    Related: http://stackoverflow.com/questions/69913/why-dont-self-closing-script-tags-work – lance Aug 08 '11 at 13:29

2 Answers2

1

You can't close a script tag using '/>' you have to use the explicit '</script>' closing tag.

ipr101
  • 24,096
  • 8
  • 59
  • 61
1

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?

Community
  • 1
  • 1
Jeff
  • 4,136
  • 23
  • 32