title: How to submit form with selected value when i use onchange
body: <p>How to submit form with selected value when i use onchange?</p>
  
  <p>And how set Action to get values?<br>
  I have This</p>
  
  <pre><code>&lt;script&gt;
  function getAction() {
  formAction = document.myForm.myMenu.value;
  document.myForm.action = formAction; 
  document.myForm.submit();
  }
  &lt;/script&gt; 
  
  
  &lt;form name="myForm" method="get" onsubmit="getAction();" action=""&gt;
  
  &lt;input type="text" name="q" size="70" maxlength="100" id="input" /&gt;
  
  &lt;select name=myMenu id="menu" onchange="submit();"  &gt;
  &lt;option value="https://www.google.com/search?q=" &gt; Google&lt;/option&gt; 
  &lt;option value="http://www.bing.com/search?q=" &gt;Bing&lt;/option&gt;
  &lt;option value="https://next.duckduckgo.com/?q=" &gt; DuckDuckGo&lt;/option&gt;
  &lt;input type="submit" name="go" value="Search" id="button" &gt;
  &lt;/form&gt;
  </code></pre>