When you use <script> to add JavaScript code to your page, in familiar way, it will look like that
<script type="text/javascript" language="javascript">
// code here
</script>
And if you want to include a external JavaScript file, you can use (in XHTML way)
<script type="text/javascript" language="javascript" src="blah.js" />
But it doesn't work (in IE and Firefox). If you want to make it works, you must use
<script type="text/javascript" language="javascript" src="blah.js">
</script>
It makes me want to be crazy 'cause I don't understand what happens to my application when the script went mad with JavaScript errors.
FYI: Script and Style elements
Update: Can you find some other tags which do not following the "empty tag" rule in XHTML for me? ;-)
No comments:
Post a Comment