html - Script tags are being nested even though I'm closing one before opening the next one -
i'm trying export 2 external scripts jsp , declare 1 on jsp body itself. altogether, have 3 tags on code. his:
<script src="dist/jstree.min.js" /> <script src="dist/libs/jquery.js" /> <script> $(function () { (...) </script>
for reason, however, when open jsp on browser, renders things this:
<script src="dist/jstree.min.js"> <script src="dist/libs/jquery.js"/><script> $(fu… </script>
that is, it's skipping end of first script , interpreting else string. i've tried explicitly writing </script>
opposed /> behaves same way. know why happening?
every browser supports xhtml (firefox, opera, safari, ie9) supports self-closing syntax on every element.
having on hand, if dont have valid xhtml document, might end having problems self-closing tags, commonly if given tag empty (as in script tags load script src), recommend doing follows in order avoid issues:
<script src="dist/jstree.min.js"></script> <script src="dist/libs/jquery.js"></script> <script> $(function () { (...) </script>
Comments
Post a Comment