title: Refer to a Javascript File in Jquery
body: <p>I have a simple HTML. I am using the JQuery for AJAX purpose. Now, I want to put my javascript function in a separate javascript file. What is the syntax for this? For example,  currently my script section in the HTML is something like this:</p>
  
  <pre><code>&lt;script&gt;
  &lt;script type="text/javascript" src="scripts/scripts.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt;
  &lt;script type = "text/javascript" language="javascript"&gt;
   $(document).ready(function() {
     $("#SubmitForm").click(Submit());
   });
  &lt;/script&gt;
  </code></pre>
  
  <p>But I want to put the function </p>
  
  <pre><code>function() {
     $("#SubmitForm").click(Submit());
   })
  </code></pre>
  
  <p>in the file scripts.js. Can I use assign a name to that function and refer to it? </p>
  
  <p>EDit: I still have a bit of problem here: I changed the code to </p>
  
  <pre><code>&lt;script type = "text/javascript" language="javascript"&gt;
  $(document).ready(function() {
      $("#SubmitForm").click(submitMe);
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>and in a separate js file, I have the following code:</p>
  
  <pre><code>var submitMe = function(){
  alert('clicked23!');
  //$('#Testing').html('news');
  };
  </code></pre>
  
  <p>Here's the body section:</p>
  
  <pre><code>&lt;body&gt;
  welcome
  &lt;form id="SubmitForm" action="/showcontent" method="POST"&gt;
  &lt;input type="file" name="vsprojFiles" /&gt;
  &lt;br/&gt;
  &lt;input type="submit" id="SubmitButton"/&gt;
  &lt;/form&gt;
  
  &lt;div id="Testing"&gt;
  hi
  &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Yet, it is still not working, anything I miss?</p>