English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Das Attribut 'for' spezifiziert das Verhältnis zwischen dem Ergebnis der Berechnung und dem Element, das in der Berechnung verwendet wird.
Führen Sie den Berechnung aus und zeigen Sie das Ergebnis im <output>-Element an:
<!DOCTYPE html> <html> <head> <title>HTML:<output> für Attribute - 基础教程网(oldtoolbag.com)</title> </head> <body> <form oninput="x.value=parseInt(a.value)+parseInt(b.value)>0 <input type="range" id="a" value="10">100 +<input type="number" id="b" value="10"> <input type="number" id="b" value="/output> </form> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
Firefox, Opera, Chrome, and Safari browsers all support the for attribute.
Note:The <output> tag is not supported by the Internet Explorer browser.
The for attribute specifies the relationship between the element used in the calculation and the calculated result.
The <output> tag is an HTML5 of the new tags.
<output for="element_id">
Value | Description |
---|---|
element_id | Specify a space-separated list of one or more element IDs, which specifies the relationship between the calculated result and the elements used in the calculation. |