title: Call javascript without function?
body: <p>I need to create a script called <code>footer.js</code> to validate the form below. I cannot make any modifications in the <code>index.html</code> file.</p>
  
  <p>I need to validate that the <code>name</code> field to be 3 characters with a space, and the <code>age</code> field to be a number between 1 and 110. All fields need to be required.</p>
  
  <p>How do I do this? How do I call my <code>footer.js</code> file? There isn't even an <code>onsubmit</code> function, just the <code>&lt;form action="#"&gt;</code>. </p>
  
  <pre><code>&lt;script type="text/javascript" src="js/jquery-1.9.1.js"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript" src="js/footer.js"&gt;&lt;/script&gt;
  
  &lt;form action="#"&gt;
      &lt;fieldset&gt;
          &lt;legend&gt;Contact&lt;/legend&gt;
          &lt;div class="textinput"&gt;
              &lt;label for="name"&gt;Name&lt;/label&gt;
              &lt;input type="text" name="name"&gt;
          &lt;/div&gt;
  
          &lt;div class="textinput"&gt;
              &lt;label for="name"&gt;Age&lt;/label&gt;
              &lt;input type="text" name="age&gt;
          &lt;/div&gt;
  
          &lt;div class="radioSelection"&gt;
              &lt;label&gt;Select one&lt;/label&gt;            
              &lt;input type="radio" name="favorit" id="html" value="html"&gt;
              &lt;label for="html"&gt;HTML&lt;/label&gt;
              &lt;input type="radio" name="favorit" id="js" value="js"&gt;
              &lt;label for="js"&gt;JavaScript&lt;/label&gt;
              &lt;input type="radio" name="favorit" id="css" value="css"&gt;
              &lt;label for="css"&gt;CSS&lt;/label&gt;
          &lt;/div&gt;
  
          &lt;div class="textareainput"&gt;
              &lt;label for="info"&gt;About you:&lt;/label&gt;
              &lt;textarea&gt;&lt;/textarea&gt;
          &lt;/div&gt;
  
          &lt;div class="action"&gt;
              &lt;button&gt;Send&lt;/button&gt;
          &lt;/div&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>