title: How to take results from form after button click (JavaScript and HTML)
body: <p>I'm pretty new to HTML and Javascript, and I'm trying to do this simple program where I fill a form and, when I hit "Submit", the results are saved (doesn't matter whether in text file, in alert, or whatever, I just want to be able to save the results). I have this code so far:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    function myFunction(){
          var Gender = document.getElementbyName('Gender').value;
          var Status = document.getElementbyName('Status').value;
          alert(Gender, Status);
      }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>                h2 {margin-top: 50px}
                  input {margin-top: 50px}
                  label {display: inline-block; width: 180px; text-align: left; margin-top: 15px}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>        &lt;h1&gt;Form&lt;/h1&gt;
          &lt;form enctype="multipart/form-data" method="post"&gt;  
  
               &lt;h2&gt;Enter: &lt;/h2&gt;
  
                  &lt;label&gt; Gender: &lt;/label&gt;               
                      &lt;select name='Gender'&gt;                
                          &lt;option value='Female' selected&gt;Female&lt;/option&gt;
                          &lt;option value='Male'&gt;Male&lt;/option&gt;               
                      &lt;/select&gt;&lt;br /&gt;                
                  &lt;label&gt;Status: &lt;/label&gt;                
                      &lt;select name='Status'&gt;               
                          &lt;option value='Single' selected&gt;Single&lt;/option&gt;
                          &lt;option value='Married'&gt;Married&lt;/option&gt;             
                      &lt;/select&gt;&lt;br /&gt;                     
    &lt;input type = 'Submit' id="Submit" onclick="myFunction()" value = 'Submit'&gt;          
    &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The page is displayed as I want it, but when I fill in the values and click submit, nothing happens. What am I doing wrong? Again, I'm very new at this so I don't have yet a good handle on all the basic stuff. I looked up some solutions online, but nothing has worked with me so far, and most solutions seemed geared for "texts" and not "option",  so I was wondering if there was a way to handle that kind of input.</p>
  
  <p>Any help, or reference, would be great. Thanks!</p>