JQuery Plugin-form submission plugin-jquery.form

Source: Internet
Author: User

1. Introduction

The JQuery form plugin is a powerful Ajax form submission plugin that allows us to easily and easily implement our forms

Convert from traditional submission to Ajax no refresh submission!

He offers two core approaches to Ajaxform and ajaxsubmit

Let us easily implement a no-refresh effect Submission Form!

http://malsup.com/jquery/form/

Https://github.com/malsup this because it is the author of the Gitbub, I downloaded a look at the Readme file is

Api

2. Quick Start

1. Introduction of Plugins

(Method with jquery)

2. Convert form to Ajax submission by traditional submission method

jquery Form object. Ajaxform ();

Import the server and then open the page to see if there are any errors (such as JS or CSS import success)

(Because of the use of the server I was to transfer this directly to a Java project I am doing, the video is placed in the server, the background is PHP, of course, your background can be Python, etc.)

Ajaxform () method

Add the required event handlers for your form and prepare for the AJAX submission form.

The Ajaxform () method does not submit the form directly, but instead prepares the form for the AJAX submission

The actual form submission also requires the user to click the Submit button (that is, to wait until the form submits the event)

Parameters: Function (will execute after successful commit) or configure an object

Common configuration properties in configuration objects:

1) URL

Submit form data to a developed URL

2) Type

Specify how form data is submitted

3) BeforeSerialize

Pass in a function that executes before the form data is serialized, which can provide an opportunity for us to modify the form data

The function accepts two parameters, the current form of a jquery object, and the configuration object that is passed into the Ajaxform method

return false within function the form will not be submitted

4) Beforesumit

callback function before form submission

The function accepts three parameters, an array form of form data, a jquery form object, and a configuration object passed into the Ajaxform method

return false within the function to not submit the form.

5) Success

JQuery Plugin-form submission plugin-jquery.form

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.