Current location - Quotes Website - Personality signature - What is a form? Briefly describe the basic working principle of a form
What is a form? Briefly describe the basic working principle of a form

Forms

This topic will give you a more comprehensive understanding from the most basic knowledge of forms to advanced applications of forms. I believe that after reading this topic, you will definitely have a better understanding of forms. The form is very familiar.

1. Overview of forms

The role of forms in web pages cannot be underestimated. They are mainly responsible for data collection functions. For example, you can collect visitors’ names and email addresses, and conduct surveys. form, guestbook, etc.

1. Components of a form

A form has three basic components: Form tag: This contains the URL of the CGI program used to process the form data and the method of submitting the data to the server. Form fields: including text boxes, password boxes, hidden fields, multi-line text boxes, check boxes, radio button boxes, drop-down selection boxes and file upload boxes, etc. Form buttons: include submit buttons, reset buttons and general buttons; used to transfer data to CGI scripts on the server or cancel input. Form buttons can also be used to control other processing tasks with defined processing scripts. In order to take into account different web design tools, this article only describes the design of the code and does not describe the operation method in detail. The following are the key points of the HTML code design of the form:

1.1 Form tag <form></form>

Function: Used to declare the form and define the scope of data collection, that is, the data contained in

and
will be submitted to the server or email.

Syntax: <FORM ACTION="URL" METHOD="GET|POST" ENCTYPE="MIME" TARGET="...">. . .</FORM>