views:

668

answers:

1

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="" />
+2  A: 

This has been asked here: Why don’t self-closing script tags work?.

Zack Mulgrew