HTML5 new form elements

HTML5 new form elements

Let’s talk about the new ones:

HTML5 has the following new form elements:

< datalist>

Note: Not all browsers support the new HTML5 form elements, but you can use them, Even if the browser does not support form attributes, it can still be displayed as a regular form element.

Next we will introduce one by one:

HTML5 elements

element regulations A list of options for the input domain.

attribute specifies that the form or input field should have auto-complete functionality. When the user begins typing in an autocomplete field, the browser should display the filled-in options in that field:

Use the list attribute of the element to bind to the element.

    

注意: Internet Explorer 9(更早IE版本),Safari不支持 datalist 标签。

HTML5 Element

The purpose of the element is to provide a reliable method of authenticating the user. The

tag specifies the key pair generator field to use on the form.

When the form is submitted, two keys will be generated, one is the private key and the other is the public key.

The private key is stored on the client, and the public key is sent to the server. The public key can be used later to verify the user's client certificate.

    
用户名: 加密:

注意: Internet Explorer 不支持 keygen 标签。

Properties Disabled causes the keygen field to gain focus when the page loads.

Challenge Challenge If it is used, set the value of the keygen to ask at the time of submission.

Disabled Disabled disable the KEYTAG field.

Form Formname Define one or more forms of the keygen field.

keytype rsa generates RSA keys.

## Name Fieldname Define the only name of the keygen element.

The name attribute is used to collect the value of the field when submitting the form.

HTML5 element

element is used for different types of output, such as calculations or script output:

    
0 100 + =

注意: Internet Explorer 不支持 output 标签。

new : New attributes in HTML5.

Attribute Value description

# This for Element_id Defines one or more elements related to the output domain.

form form_id Define one or more forms to which the input fields belong.

Name name Define the only name of the object. (Used when submitting the form)


###
Continuing Learning
||

注意: Internet Explorer 9(更早IE版本),Safari不支持 datalist 标签。

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!