एचटीएमएल डोम ओएल ऑब्जेक्ट
ओल ऑब्जेक्ट
ओल ऑब्जेक्ट एक HTML <ol> तत्व का प्रतिनिधित्व करता है।
एक ओएल ऑब्जेक्ट एक्सेस करें
आप getElementById() का उपयोग करके <ol> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("myOl");
एक ओल ऑब्जेक्ट बनाएं
आप document.createElement() विधि का उपयोग करके एक <ol> तत्व बना सकते हैं:
उदाहरण
var x = document.createElement("OL");
ओल ऑब्जेक्ट गुण
Property | Description |
---|---|
compact | Not supported in HTML5. Use style.lineHeight instead. Sets or returns whether the list should render smaller than normal, or not |
reversed | Sets or returns whether the list order should be descending or not |
start | Sets or returns the value of the start attribute of an ordered list |
type | Sets or returns the value of the type attribute of an ordered list |
मानक गुण और घटनाएँ
ओएल ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
HTML संदर्भ: HTML <ol> टैग