title: How to change "selected" value in combobox using JavaScript?
body: <p>I have 2 comboboxes, "combo1" and "combo2",</p>
  
  <p>If I select any value in combo1, I need that same value in combo2 as "selected" by JavaScript. What JavaScript code should be added to the HTML below to make it work?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;combo&lt;/title&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;form name="testForm" action="" method="post"&gt;
              &lt;select name="combo1"&gt;
                  &lt;option value="1"&gt;option 1&lt;/option&gt;
                  &lt;option value="2"&gt;option 2&lt;/option&gt;
                  &lt;option value="3"&gt;option 3&lt;/option&gt;
              &lt;/select&gt;&lt;br /&gt;&lt;br /&gt;
              &lt;select name="combo2"&gt;
                  &lt;option value="1"&gt;option 1&lt;/option&gt;
                  &lt;option value="2"&gt;option 2&lt;/option&gt;
                  &lt;option value="3"&gt;option 3&lt;/option&gt;
              &lt;/select&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>