English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <output> Tag

HTML <output>-Tag stellt das Ergebnis einer Berechnung oder einer Benutzeraktion dar.

Online-Beispiel

Zeige das Berechnungsergebnis im <output>-Element an:

!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Grundlegende Anleitung(oldtoolbag.com)</title> 
</head>
<body>
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)
    <input type="range" name="b" value="50" /> +
    <input type="number" name="a" value="10" /> =
    <output name="result"></output>
</form>
<p><strong>Hinweis:</strong>  Internet Explorer kann das output Tag nicht unterstützen.</p>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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

Note: The <output> Tag is not supported by the Internet Explorer browser.

Tag definition and usage instructions

<output> Tag is used to display the result of the calculation as output (e.g., the output of executing a script).

In HTML 4.01 HTML5difference from

<output>  Tag is an HTML 5 new tags in

Attribute

AttributeValueDescription
forHTML5element_idDescribe the relationship between the elements used in the calculation and the calculation result.
formHTML5form_idDefine one or more forms that the input field belongs to.
nameHTML5nameDefine a unique name for the object (used when submitting a form).

global attributes

<output> Tag supports global attributes, see the complete attribute table HTML Global Attributes.

event attributes

<output> Tag supports all HTML Event Attributes.