title: How to use jquery onchange to update input field?
body: <p>How do you use the jquery onchange function to update an input field so that it keeps a running total?</p>
  
  <p>e.g. I have the following dropdown list options:</p>
  
  <pre><code>&lt;select name="select" id="set1"&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select name="select" id="set2"&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;input type="text" name="total" id="total" value="" /&gt;
  </code></pre>
  
  <p>When a user select an option from the two dropdowns above, I need the total of the two selected options to be displayed in the input field. This would need to dynamically change each time a different option was selected. How can you achieve this with jquery?</p>