title: Why the form not submitting using JavaScript when input name called submit?
body: <p>I have the following form. When I have the input name set to <code>submit</code>, it won't submit the form, why is that?</p>
  
  <pre><code>&lt;form id="login" method="post" action=""&gt;
      &lt;input type="hidden" name="username" value="someval"&gt;
      &lt;input type="hidden" name="userpass" value="somepass"&gt;
      &lt;input type="hidden" name="submit" value="Login"&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
    var timeout = 12;
    setTimeout(function () {
        document.getElementById('login').submit();
    }, timeout);
  &lt;/script&gt;
  </code></pre>
  
  <p>Error message is:</p>
  
  <blockquote>
    <p>Uncaught TypeError: document.getElementById(...).submit is not a function(…)</p>
  </blockquote>
  
  <p>I guess the submit name is erasing the submit function in some way?</p>
  
  <p>JSFiddle <a href="https://jsfiddle.net/uz8vvdpg/" rel="nofollow">with</a> and <a href="https://jsfiddle.net/uz8vvdpg/1/" rel="nofollow">without</a> submit name.</p>
  
  <h2>edit to my question:</h2>
  
  <p>How can I submit the form using js when it includes input named submit?</p>