title: Submit a form without ID using Javascript
body: <p>I have a form without any ID.</p>
  
  <p><code>&lt;form action="LoginServlet" method="post" onsubmit="return checkForm(this);"&gt;</code></p>
  
  <p>How can I get the form to submit?</p>
  
  <p>I only have on form on that page, so I tried this but it didn;t work.</p>
  
  <pre><code>document.forms[0].submit()
  </code></pre>