I am having trouple with my javaScript not running in Waterfox for a standard .html file i made using notepad++
Below is my JavaScript
document.getElementByID("foot01").innerHTML = "<p>; " + new Data().getFullYear() + " Extra Technical, Out of this world.</p>";
and below is the section of HTML in my file that calls this Jscript
<footer id="foot01"></footer>
</div>
<script type="javascript" src="script.js"></script>
What is the issue here and how can i fix it, i made sure that all is spelt correctly and still cant figure it out.
That is not a MIME type. It should be
application/javascript
(ortext/javascript
for compatibility with older browsers). But thetype
attribute is optional, so just remove it entirely as the only purpose it serves (when you are writing JS) is to allow you make typos that break the script.A validator should have picked that up.
That is not how you spell
Id
, which needs a lower-cased
. JavaScript is case sensitive.That is not how you spell
Date
, which ends in ane
not ana
.