title: How to pass form element with onsubmit?
body: <p>I am trying to pass the value submitted to my form into a function using onsubmit.</p>
  
  <pre><code>&lt;form action="#" onsubmit="getWeather();return false"&gt;
      City: &lt;input type="text" id="city"&gt;
      &lt;input type="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So how would I pass the value of the city into the getWeather function? Thanks!</p>