4

While adding some very basic script tags I found a wierd "bug" in firefox (as well as IE) I added these two lines of code to my .htm page

<script type="text/javascript" src="js/jquery.js" />
<script type="text/javascript" src="js/jquery.corner.js" />

To me as well as opera and chrome they look like ordinary script tags however to firefox and IE they dont recognize them and will not run the scripts. However a simple change to

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>

Fixes the problem. I don't see why this different style of closing tags works on other tags but not the script tag. For example I can close a img tag with either

<img src="img.gif" alt=""></img>

or

<img src="img.gif" alt="" />
corymathews
  • 12,289
  • 14
  • 57
  • 77
  • This has been asked here: [Why don’t self-closing script tags work?](https://stackoverflow.com/questions/69913/why-dont-self-closing-script-tags-work). – Zack The Human Dec 25 '08 at 06:21

0 Answers0