HTML5 step by step-form (2)

Source: Internet
Author: User

<Input type = "email"/> automatically verifies that the email format is correct.

<Input type = "usl"/> automatically changes the submitted data to a url

<Input type = "number" name = "points" min = "1" max = "10"/> enter a number.
Attributes:
Max: Maximum Value
Min: Minimum value
Step: step size.
Value: Initial value

<Input type = "range" name = "points" min = "1" max = "10"/> displays a numeric range toolbar.

<Input type = "date" name = "userDate"> date. If the type is week, the week is used, and the month is used as the month. The specific datetime date plus the time is used. Datetime-local Time Zone

<Input type = "color" name = "userColor"/> RBG color


Attribute:
Autofocus: When the page is loaded and displayed, the elements in the page get the focus.
Placeholder: indicates the input format. Display the default value in the text box.
Required: automatically verified when the mouse loses focus.

Autocomplete: whether to automatically complete the text box on/off

Autofocus: whether to automatically set the focus. If the type is hidden, it is not allowed.

Form: formname indicates that a text box belongs to a form.

Formaction: where will the url text box be submitted?

Formenctype: application/x-www-form-urlencoded multipart/
Form-data text/plain specifies the encoding method for improvement

Formmethod: post/get submission method

Formtarget: _ blank/_ self/_ parent/_ top/framename

List: datalist-id input selection item

Multiple: Regular Expression pattern = "[0-9]". format the input using regular expressions.


<Meter>: to display progress, the measurement range is used only for measurements with the largest and minimum values known. For example: <meter value = "2" min = "0" max = "10"/> is generally used for graph reports.
Attributes: form, high, low, max, min, optimum, value

<Progress>: displays the progress bar, which is generally used to display the download progress.
The text drop-down box is similar to ajax auto-completion, and mainly uses the <datalist> label:
<Input list = "cars"/>
<Datalist id = "cars">
<Option value = "abc"> </option>
<Option value = "Ford"> </option>
<Option value = "Volvo"> </option>
</Datalist>
<Input type = "submit"/>


<Keygen> encrypted transmission of data. Rsa can also be another encryption method.
The data result is displayed. The output tag is used to automatically submit the calculation result:
For example:
<Input name = "num1" type = "number"/> +
<Input name = "num2" type = "number"/> =
<Output name = "result" onforminput = "value = num1.valueAsNumber + num2.valueAsNumber"> </output>


Client script data validation:
Require attribute: If this attribute is specified, it must be entered.
CheckValidaty: Specifies the verification function.
SetCustomValidity () specifies the self-verification function


Author: shiyuan17

Related Article

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.