The Name,target,enctype,method in the form form inside the HTML and the use of the actionHML Form HTML is an important means for HTML pages to interact with the browser, and the form mainly submits some client data.
forms and Form fields do not have the ability to compose, and form pages are ultimately organized by tables.
The main function of the form is to collect information, the general form consists of two parts, one is to describe the form elements of the HTML code, the second is the client's script, or the server used to process the user's information to fill the program.
the processing of form information is : When you click the Submit button in the form, the information entered in the form is uploaded to the server, then processed by the server's application, processed, or stored in the server-side database by the user-submitted information. or return the relevant information to the client browser.
Basic syntax:
<form name= "Form_name" action= "/" method= "Form_method" enctype= "value" target= "target page" >
.........
</form>
The properties of the form tag are explained as follows:
Name: Names of the forms
Method: Defines how the form results are routed from the browser to the server, usually in two ways get and post
Action: the location (relative or absolute) used to define the form handler (a asp,cgi, etc.)
enctype: Setting the encoding of form data
Target: Sets how the returned information is displayed
You can control the relationship between a form and a background program by naming the form.
In the method property, theGET method appends the contents of the form to the URL address, so that the length of the commit information is limited to no more than 8,192 characters. If the information is too long, it will be truncated, leading to unexpected processing results. At the same time the Get method is not confidential, not suitable for processing such as credit card number requirements of confidential content, and can not transmit non-ASCII characters.
The POST method is to include the data that the user fills in the form in the body of the form, which is transferred to the handler on the server, which has no character restrictions, it contains the ISO10646 character set, is a mailing method, the address bar of the browser does not display the submitted information, There is no limit to the data transmitted in this way.
When you do not specify which way, the default is Get mode .
There are several ways to set the encoding of form information submissions:
Text/plain: Transmitting information in plain text
application/x-www-form-urlencoded: The default encoding form
multipart/form-data: Using mine encoding
Sets the window that the form information returns.
The value of TARGET has the following types:
_blank: Displays the returned information in the newly opened browser window
_parent: Displays the return information in the parent browser window
_self: Displays the return information in the current browser window
_top: Displays the return information in the top-level browser window
HTML inside Form form Name,action,method,target,enctype and other attribute usage