title: how to get form elements values in javascript and create a url with thoese values
body: <p>For example I have a form:</p>
  
  <pre><code>&lt;form name='myform' id='myformid'&gt;
  
    &lt;input type='text' name='name' id='name'&gt;
    &lt;input type='text' name='color' id='color'&gt;
    &lt;input type='text' name='made' id='made'&gt;
  
    &lt;input type='submit' name='submit'&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Now I want to call a javascript function on above form submit. This function will get all form elements values and create a URL to redirect.</p>
  
  <p>For example:</p>
  
  <pre><code>example.com/search.php?name=toyota&amp;color=white&amp;made=abc
  </code></pre>
  
  <p>How can I create this JS function? </p>
  
  <p>Thanks</p>