Introduced in HTML5
Riassunto
Il tag HTML <output> rappresenta il risultato di un calcolo o azione dell'utente.
- Content categories Flow content, phrasing content, listed, labelable, resettable form-associated element, palpable content.
- Permitted content Phrasing content.
- Tag omission None, both the starting and ending tag are mandatory.
- Permitted parent elements Any element that accepts phrasing content.
- DOM interface
HTMLOutputElement
Attributi
Questo arogomento contiene gli attributi globali
-
for - Un elenco di ID di altri elementi, che indica che tali elementi hanno contribuito a valori di ingresso (o i altro modo compromesso) il calcolo.
-
form - L'elemento form che questo elemento è associato (il suo "proprietario del form"). Il valore dell'attrbuto deve essere un ID di un elemento di un form nello stesso documento. Se questo attrbuto non è specificato, l'elemento di output deve essere un discendente di un elemento del form. Questo attributo permette di inserire elementi ovunque all'interno del documento, non solo come discendente dei loro elementi.
-
name - Il nome dell'elemento.
Esempio
<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>
Specificazioni
| Specificazione | Stato | Commenti |
|---|---|---|
| <output> in WHATWG HTML Living Standard | Living Standard | |
| <output> in HTML5 | Candidate Recommendation |
Compatibilità fra browser
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 10 | 4.0 (2.0) | 10 | 11 | nightly |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | 4.0 (2.0) | ? | ? | ? |
Vedi anche
- Other form-related elements:
<form>,<input>,<button>,<datalist>,<legend>,<label>, None, both the starting and ending tag are mandatory.,<select>,<option>,<textarea>,<keygen>,<fieldset>,<optgroup>and<progress>.