Home  >  Article  >  Web Front-end  >  The use and application of the output tag in html5

The use and application of the output tag in html5

黄舟
黄舟Original
2017-07-03 10:30:081739browse

be6d67dae90cc1ad6469079e163d0939 tag defines different types of output, such as the output of a script. The

be6d67dae90cc1ad6469079e163d0939 tag is new in HTML 5.

Properties

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)

You will understand after looking at an example:

<!DOCTYPE HTML>  
<html>  
<head>  
<mce:script type="text/<a href="http://lib.csdn.net/base/javascript" class=&#39;replace_word&#39; title="JavaScript知识库" target=&#39;_blank&#39; style=&#39;color:#df3434; font-weight:bold;&#39;>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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn