Home >Web Front-end >HTML Tutorial >Summary of attributes and function applications in form forms

Summary of attributes and function applications in form forms

零下一度
零下一度Original
2017-06-01 14:58:313781browse

In layman's terms, the form tag is used for form submission. This article is about the introduction of form form attributes and form form functions. The following is a detailed introduction to its specific use through examples.

Introduction to form form attributes

1. Detailed explanation of the method attribute in the form tag

Browse The processor uses the method set by the method attribute to transmit the data in the form to the server for processing. There are two methods: POST method and GET method.

2. The lable label in the form

My friends, when you were learning the various controls of the form, did you find a label--label, this article Let’s reveal his role.

The label label does not present any special effects to the user. Its function is to improve usability for mouse users. If you click on the text within the label label, the secondary control will be triggered.

That is to say, when the user clicks to select the label label, the browser will automatically focus on the form control related to the label.

3. Detailed explanation of the parameters and attributes of the form in HTML

new: New attributes in HTML5. As shown below

Summary of attributes and function applications in form forms

4. Detailed introduction of all types in the HTML5 form

button: Define clickable buttons ( Usually used with JavaScript to start the script)

checkbox: Define the check box

color: Define the color picker

5. Detailed explanation of HTML5 new form attributes

The most complete form attributes can be obtained by consulting w3cschool-h5 form attributes. Here we only explain the common attributes.

autocomplete (autocomplete): Be able to record user input and give prompts. This is the role of autocomplete

6. HTML5 form attribute tutorial example

New attribute:
autocomplete
novalidate

New attribute:

autocomplete
autofocus
form
formaction
formenctype
formmethod
formnovalidate
formtarget
height and width
list
min and max
multiple
pattern (regexp)
placeholder
required
step

Form form function introduction

1. Based on HTML to implement form submission without refreshing the page

Using ajax to implement form submission without refreshing the page is often used in projects. Some time ago, I learned from my master several other methods of submitting forms without refreshing, mainly based on the iframe framework. Now the editor has organized and shared the script home platform for your reference. Using ajax to implement form submission without refreshing the page is often used in projects. Some time ago, I learned from the master several other methods of submitting forms without refreshing, mainly based on the iframe framework

2. HTML5/CSS3 sample code sharing to implement a beautiful step-by-step registration login form

There are now many step-by-step login and registration forms, mainly to improve the user experience. Users can selectively fill in the corresponding form information, so that users will not be deterred by seeing a bunch of forms. What I share with you today is a step-by-step registration and login form based on HTML5 and CSS3. Needless to say, it looks very beautiful. You will know after taking a look at the DEMO

Summary of attributes and function applications in form forms

3. HTML 5 form new function analysis

The wheels of time are rolling, the front end The road never ends. For this front-end technology, which is multi-specialized, we must understand it and learn it at the first time for any technological innovation, such as this beautiful flower in the Web world---HTML 5. Although when HTML 5 was released, many people (including me) felt that its popularity was still far away, but since its release, many enterprise-level websites have tried to apply it (such as applications, such as canvas applications), making HTML 5 A big step has been taken, and the subsequent release of IE9 undoubtedly allows us to see that HTML 5 is no longer far away from us.

4. Instance code of form directly embedded in html

The returned jump page can be directly assigned to a variable on the page (for example, the ajax setting returns the format html), which is very good for displaying complex logic

5. CSS3 and HTML5 Detailed example of implementing form verification function

This article mainly introduces the use of HTML5 and CSS3 form verification function. Friends in need can refer to it

Client-side verification is a web client program One of the most commonly used functions, we have previously used various js libraries for form validation. HTML5 actually already provides us with the form validation function. As for why it has not become popular, it is probably due to compatibility issues and the fact that the style is too ugly

Summary of attributes and function applications in form forms

Questions and answers related to form elements:

javascript - After using ajax to submit data, the page form submit does not work

javascript - angularjs custom form verification instruction is invalid

【Related recommendations】

1. php.cn original html5 video tutorial

2. Attributes in the tag Detailed explanation

3. The meaning of html from and a summary of the usage of form

4. Form elements: Get the most complete variety of html form elements And summary of how to use

The above is the detailed content of Summary of attributes and function applications in form forms. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn