What does the HTML5 output label mean? HTML5 how to use the output label

Source: Internet
Author: User
What does the HTML5 output label mean? HTML5 the use of the output label is here, this article describes the definition of the HTML5 output label, and how to use the HTML5 output tag (with code instance)

HTML5 output label label definition:

The <output> tag is displayed as a result of the calculation (such as the output of the execution script).

Properties of HTML5 <output>:

1.FOR Specifies the list of IDs for one or more elements, separated by spaces. These elements describe the relationship between the elements used in the calculation and the results of the calculations.

2.form Specifies the list of IDs for one or more forms that the <output> element belongs to, separated by a space.

3.NAME Specifies the name of the <output> element.

According to the example:

Example:

<form oninput= "X.value=parseint (a.value) +parseint (b.value)" >0<input type= "range" id= "a" value= ">100" +<input type= "number" id= "B" value= ">=<output name=" x "for=" a B "></output></form>

Results:

<output>3 properties in the form because most browsers do not support it, so output can no longer be written in any other position, only in the form of the effect.

Attention:

The name and ID of the label property that is wrapped in the form will have the same effect, including x.value can also be replaced with x.innerhtml.

In addition, the Oninput event is triggered when the user enters the event!

HTML5 instructions for using the output label:

The <output> tag is displayed as a result of the calculation (such as the output of the execution script).

For example, the results of the calculation are displayed in the <output> element:

<! DOCTYPE html>

How to use the output element in a form:

<form action= "form_action.asp" method= "Get" name= "Sumform" ><output name= "sum" ></output></form >tiy<! DOCTYPE html>

Differences in HTML 4.01 and HTML5

The <output> tag is a new label in HTML 5.

Browser support

Firefox, Opera, Chrome, and Safari browsers all support <output> tags.

Note: The Internet Explorer browser does not support <output> tags.

"Recommended"

HTML5 audio tags How to use? HTML5 Auto-Play Implementation code instance

How does the HTML address tag work? An explanation of how HTML address tags are used

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.