Reputation: 104
I have a simple test page which seems to be working in Chrome but Not in Firefox.
The HTML
Code is:
<html>
<head>
<title>Test Title</title>
</head>
<body>
<script scr="test.js"> </script>
<h1> Test </h1>
</body>
</html>
The JavaScript
code is:
alert("Hello World");
alert("Hello World");
alert("Hello World");
Thanks in advance,
Upvotes: 1
Views: 359
Reputation: 507
First of all your script elements source property got a typo and I would always use the MIME-Type info. try:
<script type="text/javascript" src="test.js"></script>
Furthermore, script definitions aswell as css links etc. should normaly be placed in the <head>
section of your html document, not in the <body>
EDIT:
Actually the script MIME-Type is kinda deprecated and is not needed anymore. However, it does no harm if left in there.
Upvotes: 3