title: Pass <select> value to function parameter
body: <p>I have select cars in my form. How to pass its value to change function like parameter?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;hello&lt;/title&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script language="JavaScript"&gt;
          var a = 0;
          var b = 0;
      &lt;/script&gt;    
  
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;script&gt;
          function change()
          {
          a=5
          b=6
          update();
          }
  
          function update()
          {
  
          var returns = document.getElementById("returns");
          returns.value =a;
  
          var status = document.getElementById("status");
          status.value = b;
          }
      &lt;/script&gt;
  
      &lt;form&gt;
      &lt;input type="button" value="change" onclick="change()"&gt;
      &lt;input type="text" name="returns" id="returns"&gt;
      &lt;input type="text" name="status" id="status"&gt;
  &lt;select name="cars"&gt;
    &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
    &lt;option value="saab"&gt;Saab&lt;/option&gt;
    &lt;option value="fiat"&gt;Fiat&lt;/option&gt;
    &lt;option value="audi"&gt;Audi&lt;/option&gt;
  &lt;/select&gt;
  
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>