HTMLIFrameElement : HTMLElement
Return to: HTML DOM Level 5 index

Represents a nested browsing context.

Platform Support

Mozilla Chrome Safari Opera IE Netscape
1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+

Constructors

Constructor Action Mozilla Chrome Safari Opera IE Netscape
HTMLIFrameElement Constructor() : HTMLIFrameElement
Creates an instance of the HTMLIFrameElement.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+

HTMLIFrameElement() : HTMLIFrameElement

Creates an instance of the HTMLIFrameElement.

Returns
HTMLIFrameElement

Visibility
internal

Properties

Property Action Mozilla Chrome Safari Opera IE Netscape
src : String
Specifies the address of a page that the nested browsing context is to contain.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

srcdoc : String
Specifies the content of the page that the nested browsing context is to contain.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

name : String
The name of the nested browsing context.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

sandbox : DOMSettableTokenList
Enables a set of extra restrictions on any content hosted by the iframe.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

seamless : Boolean
Indicates that the iframe element's browsing context is to be rendered in a manner that makes it appear to be part of the containing document (seamlessly included in the parent document).
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

width : String
Specifies the width of the iframe.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

height : String
Specifies the height of the iframe.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

contentDocument : Document
The Document object of the active document of the iframe element's nested browsing context.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

contentWindow : WindowProxy
The WindowProxy object of the iframe element's nested browsing context.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 3.0+ 3.0+
Availability

WhatWG

Inherited Functions

Method Action Mozilla Chrome Safari Opera IE Netscape
getElementsByClassName(String classNames) : NodeList
Returns a NodeList containing all the Element nodes with the specified classNames.
Show Details 1.9+ 5.0+ 3.1+ 9.51+ no no

Parameters
String classNames (one-or-more)A string representing the class name(s) of the elements to return. Multiple class names should be separated by spaces.

Returns
NodeList

Using getElementsByClassName

                        	                    document.getElementById("useCases").getElementsByClassName("question");

Would return a NodeList of all elements inside the element with the id "useCases" to which the class "question" applies.

                        	                    document.getElementById("useCases").getElementsByClassName("question issue");

Would return a NodeList of all elements inside the element with the id "useCases" to which both the classes "question" and "issue" apply.

Remarks

Returns a list of child elements to which the specified className applies. The returned NodeList is sorted in tree order (the order the elements were found during a depth-first preorder traversal through the node tree).

See Also

Document.getElementsByClassName|Element.getElementsByClassName|HTMLDocument.getElementsByClassName

Availability

HTML 5|W3C|W3C

References

HTMLIFrameElement

Availability

JavaScript 1.2|WhatWG

text_javascript aptana_docs