HTML form tag tutorial (2): _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
This tutorial introduces the application of various attributes of FORM tag in Webpage Design. & lt; FORM & gt; basic syntax of the marked NAME attribute 01 & lt; Formname & quot; Form_name & quot; & gt; 02 ...... 03 & lt; Form & gt; Syntax interpretation controls the relationship between forms and background programs by naming them. Example: This tutorial introduces the application of various attributes of FORM tags in web design. Syntax explanation
By naming a form, you can control the relationship between the form and the background program. Example: 11-1.htm
Insert a form into the page.
01
02
03
04
05
06
07 Insert Form
08
09
10 user surveys
11
13
14File description
The first row is the form tag and the form name is "invest ".
# P # syntax explanation
Define the form submission address in the action attribute. Example: 11-2.htm
Set the submission address of the form.
01
02
03
04
05
06
07 Set the form submission address
08
09
10 user surveys
11
13
14File description
Row 3 is a form tag with the form name "invest". The form content is sent by email.
# P # file example: 11-3.htm
Set the form submission method.
01
02
03
04
05
06
07 Set the form submission method
08
09
10 user surveys
11
13
14File description
The first row is a form tag. The form name is invest. The content of the form is sent by email and the get transmission method is used.
# P # syntax explanation
The value is shown in the following table.
Attribute value description Text/plin transmits information in plain Text Application/x-www-Form-urlencoded default encoding format Multipart/Form-data use mine encoding file example: 11-4.htm
Sets the encoding method for form information submission.
01
02
03
04
05
06
07 Sets the encoding method for information submission.
08
09
10 user surveys
11
13
14File description
Row 3 is a form tag with the form name "invest". The form content is sent by email and sent in plain text using the get transmission method.
# P # syntax explanation
The following table lists the target values.
Property value description _ blank: The returned information is displayed in the new browser window _ parent: The returned information is displayed in the parent browser window _ self: The returned information is displayed in the current browser window _ top example of a file in the top-level browser window with the returned information displayed: 11-5.htm
Set the window returned by the form information.
01
02
03
04
05
06
07 Window for setting information returned
08
09
10 user surveys
11
13
14File description
Row 3 is a form tag with the form name "invest". The form content is sent by email and transmitted in plain text using get. If any information is returned, the information is displayed in a new browser window.
In

Various form fields can basically meet the requirements of website information collection. If you require a viewer to Enter text information, such as name or message, you can use text fields. If the browser is required to select within a fixed range, you can select one or more buttons. in actual application, this method is often used for gender, nationality, and hobbies. Sometimes the browser is asked to submit a file. You can use a file domain, for example, a game selects a prototype of the heroine and requires the applicant to submit a photo.

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.