--- title: Il tag slug: Web/HTML/Element/output translation_of: Web/HTML/Element/output --- 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 {{no_tag_omission}} Permitted parent elements Any element that accepts phrasing content. DOM interface {{domxref("HTMLOutputElement")}} Attributi Questo argomento include attributi globali {{htmlattrdef("for")}} Un elenco di ID di altri elementi, che indica che tali elementi hanno contribuito a valori di ingresso (o comunque influenzato) il calcolo. {{htmlattrdef("form")}} L'elemento form a cui l'elemento di output è associato (il "proprietario del form"). Il valore dell'attributo deve essere un ID di un form nello stesso documento. Nel caso in cui questo attributo non sia specificato, l'elemento di output deve essere un discendente di un form. Questo attributo permette di inserire elementi di output ovunque all'interno del documento, prescindendo dal vincolo che gli elementi output debbano essere collocati all'interno del form cui fanno riferimento. {{htmlattrdef("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> Specifiche Specifiche Stato Commenti {{SpecName('HTML WHATWG', 'the-button-element.html#the-output-element', '<output>')}} {{Spec2('HTML WHATWG')}} {{SpecName('HTML5 W3C', 'forms.html#the-output-element', '<output>')}} {{Spec2('HTML5 W3C')}} Compatibilità fra browser {{CompatibilityTable}} Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari Basic support 10 {{CompatGeckoDesktop("2.0")}} 10 11 nightly Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Basic support {{CompatUnknown}} {{CompatGeckoDesktop("2.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} Vedi anche Other form-related elements: {{HTMLElement("form")}}, {{HTMLElement("input")}}, {{HTMLElement("button")}}, {{HTMLElement("datalist")}}, {{HTMLElement("legend")}}, {{HTMLElement("label")}}, {{HTMLElement("select")}}, {{HTMLElement("optgroup")}}, {{HTMLElement("option")}}, {{HTMLElement("textarea")}}, {{HTMLElement("keygen")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("progress")}} and {{HTMLElement("meter")}}. {{HTMLRef}}
Il tag HTML <output> rappresenta il risultato di un calcolo o azione dell'utente.
<output>
Questo argomento include attributi globali
<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>
{{CompatibilityTable}}