HTML form
Tags overview

Source: Internet
Author: User
Tags html form

form is one of the main external forms of dynamic Web page implementation. Forms and form fields do not have the ability to compose, and the form page is ultimately organized by a table. HTML forms are an important means of interacting with the browser side of HTML pages. Forms can be used to collect information about client submissions.

When browsing a Web site, you often encounter forms, which are an important part of the interactive functionality of your Web site. Whether the site uses the form of language to achieve the interactive functions of the site, such as ASP, PHP, JSP, forms have become their unified external form.

The main function of a form is to gather information, specifically to gather information about a visitor. For example, on the Internet to apply for an e-mail, you must fill out the Web site provided by the requirements of the form page, the main content is the name, age, contact information and other personal data. For example, to speak in a forum, to apply for qualifications before speaking, but also to complete a form page.

Forms can be used to investigate, order, search, and other functions. A general form consists of two parts, one is the HTML source code that describes the form element, the other is the client's script, or the server-side process used to process the information the user fills in. In HTML, we can define a form and make it work with a form handler on a server side, such as a CGI or ASP.

The process of form information processing is: When you click the Submit button in the form, the information entered in the form is uploaded to the server, which is then processed by the relevant application in the server, processed or stored in the server-side database, or returned to the client browser by the information submitted by the user.

A form is a specific area on a Web page. This area is defined by a pair of <Form> tags. This step has several aspects of the role. First, limit the scope of the form. Other form objects are inserted into the form. When you click the Submit button, the content that is submitted is also within the scope of the form. The second aspect is carrying information about the form, such as the location of the script that handles the form, how to submit the form, and so on. This information is not visible to the viewer, but it does play a decisive role in dealing with the form.

Basic syntax
<form name= "Form_name" method= "method" action= "url" enctype= "value" target= "Target_win" >
02. ...
</Form>
Grammar explanation
The properties of the <Form> tag are shown in the following table

Attribute description

Name of form
Method defines how form results are routed from the browser to the server, typically in two ways: Get and post
Action is used to define the location (relative address or absolute address) of the form handler (ASP,CGI, etc.)
Enctype How to encode form data
Target sets how information is displayed

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.