jQuery simulate form submit

Sam Deering
Tweet

Simple jQuery snippet to simulate a form submit.

$("#myform").submit();

or using raw JavaScript (on element):

this.form.submit();

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Sana Talha
  • The Real Sam

    How would you go about fully simulating the form post in a page with out a html form.
    Example: Submitting from a js bookmaklet.