एचटीएमएल डोम आउटपुट ऑब्जेक्ट
आउटपुट ऑब्जेक्ट
आउटपुट ऑब्जेक्ट एक HTML <आउटपुट> तत्व का प्रतिनिधित्व करता है।
नोट: <आउटपुट> तत्व इंटरनेट एक्सप्लोरर/एज में समर्थित नहीं है।
आउटपुट ऑब्जेक्ट तक पहुंचें
आप getElementById() का उपयोग करके <आउटपुट> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("myOutput");
युक्ति: आप किसी प्रपत्र के तत्वों के संग्रह के माध्यम से खोज कर <आउटपुट> तत्व तक भी पहुंच सकते हैं ।
एक आउटपुट ऑब्जेक्ट बनाएं
आप document.createElement() विधि का उपयोग करके एक <output> तत्व बना सकते हैं:
उदाहरण
var x = document.createElement("OUTPUT");
आउटपुट ऑब्जेक्ट गुण
Property | Description |
---|---|
defaultValue | Sets or returns the default value of an <output> element |
form | Returns a reference to the form that contains the <output> element |
htmlFor | Returns the value of the for attribute of an <output> element |
labels | Returns a list of <label> elements associated with the <output> element |
name | Sets or returns the value of the name attribute of an <output> element |
type | Returns which type of HTML element the Output object represents |
value | Sets or returns the value of an <output> element |
मानक गुण और घटनाएँ
आउटपुट ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
HTML संदर्भ: HTML <आउटपुट> टैग