title: Want to submit and save form data using Javascript
body: <p>I want to submit and save form data by using javascript</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;title&gt;Save data using JS&lt;/title&gt; 
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Sign up&lt;/h1&gt;
  &lt;form name="myForm"&gt;
    Name:&lt;br&gt;
    &lt;input type="text" name="fname" required maxlength="40"&gt;&lt;br&gt;&lt;br&gt;
   E-mail: &lt;input type="email" name="email" required&gt;&lt;br&gt;&lt;br&gt;
    Gender:&lt;br&gt;
    &lt;input type="radio" name="gender" value="male" checked&gt; Male&lt;br&gt;
    &lt;input type="radio" name="gender" value="female"&gt; Female&lt;br&gt;&lt;br&gt;
    &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
     
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So, when i click submit button, form data should be saved somewhere, for every user who fills and submits it. This should be done using Javascript,jquery or ajax.</p>