Home > Article > Web Front-end > The use and application of the output tag in html5
be6d67dae90cc1ad6469079e163d0939 tag defines different types of output, such as the output of a script. The
be6d67dae90cc1ad6469079e163d0939 tag is new in HTML 5.
Properties | Value | Description |
---|---|---|
for | id of another element | Define one or more elements related to the output domain . |
form | formname | Define one or more forms to which the input fields belong. |
name | unique name | Definition The unique name of the object. (Used when submitting the form) |
<!DOCTYPE HTML> <html> <head> <mce:script type="text/<a href="http://lib.csdn.net/base/javascript" class='replace_word' title="JavaScript知识库" target='_blank' style='color:#df3434; font-weight:bold;'>JavaScript</a>"><!-- function write_sum() { x=5 y=3 document.forms["sumform"]["sum"].value=x+y } // --></mce:script> </head> <body onload="write_sum()"> <form action="form_action.asp" method="get" name="sumform"> <output name="sum"></output> </form> </body> </html>
<form action="" id="myform" oninput="num.value=parseInt(num1.value)+parseInt(num2.value)"> <input type="number" id="num1">+ <input type="number" id="num2">= <output name="num" for="num1 num2"></output> </form>
God rewards those who work hard, and those who accumulate more will gain more. A gentleman's journey is to cultivate one's character through tranquility and cultivate one's virtue through frugality. Without indifference, there is no clear ambition; without tranquility, there is no far-reaching goal. If there is permanence, there is no need to wake up at midnight and sleep in the middle of the night; the worst thing is to fish for three days and dry the nets for two days, and to fetch water from bamboo baskets in vain.
The above is the detailed content of The use and application of the output tag in html5. For more information, please follow other related articles on the PHP Chinese website!