In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what form refers to in html, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Form means "form" in html, it is a tag that creates a HTML form for user input, syntax format "form elements"; form tag pairs can contain a variety of form elements, such as input, textarea, select, option, button, and so on.
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
Form, which means "form" in html, is a tag that creates an HTML form for user input.
A form is an area that contains form elements; function: used to collect content entered by different types of users.
Form elements allow users to enter content in the form, such as text fields (textarea), drop-down lists, radio-buttons boxes, checkboxes, and so on.
Forms are created with tags in which the objects in which the form is placed, such as form fields, buttons, and other things:
.... Form element.
Commonly used form elements
ü form form
ü input form elements, form items
ü select and option drop-down menus
ü textarea text field
(1) form element
Function: used to create a form
Format:
Basic usage:
Important attributes:
1JI action: indicates the page to which the content in the current form is submitted for processing
2Force method: indicates the current form submission method. The common methods are get and post. The default is get submission.
(2) input element
Represents an input box in a variety of forms, and you can determine which input box to display based on the type property.
Basic usage:
Effect:
Pay attention to details:
1, for input, the default value of its type is text, which represents a single line of text
2. For input, it is best to add a name attribute to it, which is used to submit the content entered by the user to the page that will process the data.
GET submission and POST submission:
GET:
If you submit as get, but do not write the name attribute, then the content entered by the user will not be submitted, but will also appear? This logo:
POST:
When a user submits in post mode, the content entered by the user will not be placed in the address bar, which is more secure:
Summary of GET and POST:
1Get will put the input of the user into the address bar. It is not safe to use GET to request.
2Jing post will not put the content entered by the user into the address bar, which is relatively safe
Details:
1. Every input tag has a value attribute, and different types of input and value play different roles.
For type= "text", value is optional because anything entered by the user can be submitted to the past.
For type= "radio" or type= "checkbox", it cannot be submitted without value.
2, for type= "radio", if you only want to select one, you need to add a name attribute to each input, and the attribute value must be the same. If you do not add it, you will not be able to meet the requirements of the radio box.
3, with regard to the width of a single line of text, you can use the size property to indicate the character length, but it is not actually needed. We usually control it through CSS.
(3) select and option
Function: used to implement the drop-down list
Format:
Content
Basic usage:
Note:
1. By default, when submitting, it takes the content in the option as the submitted content, but usually we don't do this. We usually set a value property to the opton, and we usually use numbers for the attribute value.
The situation after using value is as follows:
We can use the selected attribute to have an option handle the default selected state.
(3) textarea
Function: provide input boxes for entering a large number of texts, such as Qzone publishing status, posting bar posting, etc.
Format:
Basic usage:
The above is all the content of this article "what does form mean in html?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un