Форма обратной связи с помощью jQuery, jGrowl, ajaxForm и Buzz. Скрипт формы обратной связи
An HTML form on a web page enables a user to provide inputs to an application. The data entered by the user is then sent to the server for further processing or storing in the database. A sample html form is given as under:
Listing 1 : Sample HTML Form
Sample HTML
Username:
Password:
Male
Female
I have a bike
I have a car
The above code produces a basic HTML form having the following fields:
- Text field for providing Username.
- Password field to provide Password.
- Radio button to provide the sex either male or female.
- Check box to indicate the type of vehicle the user owns.
HTML form has the following attributes which are most commonly used:
- Method: This can have value either of the two values: "get" or "post". "post" is used when we need to submit some information which needs to be stored in a persistent data storage. "get" is used when we need to retrieve some information based on the input value which is submitted.
- Name: This is used to provide a name to the individual form and is required when we need to access individual components of a form.
- Action: This attribute contains the name of the file which operates on the fields entered by the user. It also holds the functions, hidden fields definitions which are required to perform a task.
Let us consider the following code snippet.
Listing 2 : Sample HTML form code snippet
Example 2
NAME:
Email:
Website:
Comment: