title: submit ajax form on page load
body: <p>i have the following form, i want to create a function to auto click on page load.</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-html lang-html prettyprint-override"><code>&lt;form id="demo-form" method="post" action="http://demo.org/cad/original/core.php"&gt;
    &lt;fieldset id="demo-user-chat"&gt;
      &lt;label for="demo_chat"&gt;Message&lt;/label&gt;
      &lt;textarea name="demo_chat" id="demo_chat" rows="5" cols="50" onkeypress="if (typeof pressedEnter == 'function') return pressedEnter(this,event);" placeholder="Message" autocomplete="off"&gt;&lt;/textarea&gt;
  
    &lt;/fieldset&gt;
  
  
    &lt;div id="demo-user-submit"&gt;
      &lt;input type="submit" id="submitform" name="submit" class="submit" value="Submit"&gt;
  
    &lt;/div&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>