JavaScript
Article

jQuery simulate form submit

By Sam Deering

Simple jQuery snippet to simulate a form submit.

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

or using raw JavaScript (on element):

this.form.submit();
Sam Deering
Meet the author
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.
  • 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.

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!