एचटीएमएल डोम आईफ्रेम ऑब्जेक्ट
आईफ्रेम वस्तु
IFrame ऑब्जेक्ट एक HTML <iframe> तत्व का प्रतिनिधित्व करता है।
एक आईफ्रेम ऑब्जेक्ट तक पहुंचें
आप getElementById() का उपयोग करके <iframe> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("myFrame");
युक्ति: आप window.frames गुण का उपयोग करके <iframe> तत्व तक भी पहुंच सकते हैं।
एक आईफ्रेम ऑब्जेक्ट बनाएं
आप document.createElement() विधि का उपयोग करके एक <iframe> तत्व बना सकते हैं:
उदाहरण
var x = document.createElement("IFRAME");
आईफ्रेम वस्तु गुण
Property | Description |
---|---|
align | Not supported in HTML5. Use style.cssFloat instead. Sets or returns the value of the align attribute in an iframe |
contentDocument | Returns the document object generated by an iframe |
contentWindow | Returns the window object generated by an iframe |
frameBorder | Not supported in HTML5. Use
style.border instead. Sets or returns the value of the frameborder attribute in an iframe |
height | Sets or returns the value of the height attribute in an iframe |
longDesc | Not supported in HTML5. Sets or returns the value of the longdesc attribute in an iframe |
marginHeight | Not supported in HTML5. Use style.margin instead. Sets or returns the value of the marginheight attribute in an iframe |
marginWidth | Not supported in HTML5. Use style.margin instead. Sets or returns the value of the marginwidth attribute in an iframe |
name | Sets or returns the value of the name attribute in an iframe |
sandbox | Returns the value of the sandbox attribute in an iframe |
scrolling | Not supported in HTML5. Sets or returns the value of the scrolling attribute in an iframe |
seamless | Sets or returns whether an iframe should look like it is a part of the containing document (no borders or scrollbars), or not |
src | Sets or returns the value of the src attribute in an iframe |
srcdoc | Sets or returns the value of the srcdoc attribute in an iframe |
width | Sets or returns the value of the width attribute in an iframe |
मानक गुण और घटनाएँ
IFrame ऑब्जेक्ट मानक गुणों और ईवेंट का भी समर्थन करता है ।
संबंधित पृष्ठ
HTML संदर्भ: HTML <iframe> टैग