"HTML5" form elements

Source: Internet
Author: User

* DataList

The DataList element specifies a list of options for the input field.

The list is created by the option element within DataList.

To bind DataList to an input field, refer to the ID of DataList with the list property of the input field:

<!DOCTYPE HTML><HTML><Body><formAction= "/example/html5/demo_form.asp"Method= "Get">webpage:<inputtype= "url"List= "Url_list"name= "link" /><DataListID= "Url_list">    <optionlabel= "W3school"value= "http://www.w3school.com.cn" />    <optionlabel= "Google"value= "http://www.google.com" />    <optionlabel= "Microsoft"value= "http://www.microsoft.com" /></DataList><inputtype= "Submit" /></form></Body></HTML>

* keygen

The role of the keygen element is to provide a reliable way to authenticate users.

The keygen element is a key pair generator (Key-pair generator). When the form is submitted, two keys are generated, one is the private key, and one 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 to later authenticate the user's client certificate (certificate).

Currently, the browser's poor support for this element is not enough to make it a useful security standard.

<!DOCTYPE HTML><HTML><Body><formAction= "/example/html5/demo_form.asp"Method= "Get">Username:<inputtype= "text"name= "Usr_name" />Encryption:<keygenname= "Security" /><inputtype= "Submit" /></form></Body></HTML>

* Output

<!DOCTYPE HTML><HTML><Head><Scripttype= "Text/javascript">functionRescalc () {NumA=document.getElementById ("Num_a"). Value;numb=document.getElementById ("Num_b"). Value;document.getelementbyid ("result"). Value=Number (NumA)+Number (NumB);}</Script></Head><Body><P>Simple calculator using the output element:</P><formonsubmit= "return false"> <inputID= "Num_a" /> + <inputID= "Num_b" /> = <OutputID= "Result"Onforminput= "Rescalc ()"></Output></form></Body></HTML>

"HTML5" table cell element

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.