Javascript: Using External Scripts
<p>I am trying to import a simple script into an HTML doc. It won't work and I have no idea what I am doing wrong.</p>

<p>Name of external script--> (function.js)</p>

<pre><code>window.onload = myFunction;

       function myFunction() 
       {
             document.getElementById("HERE").innerHTML = "message";
       }
</code></pre>

<p>name of HTML doc--> (attributes.html)</p>

<pre><code>&lt;!DOCTYPEhtml&gt;

    &lt;html&gt;
    &lt;head&gt;

         &lt;title&gt; This is an example of using an external script&lt;/title&gt; 
            &lt;script type ="text/javascript" src= "function.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;

          &lt;h1 id="HERE"&gt; 
          &lt;/h1&gt;

    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
