![]() |
VOOZH | about |
The HTML DOM IFrame srcdoc property is used to set or return the value of a srcdoc attribute of an <Iframe> element. The srcdoc attribute is used to specify the HTML content of the document in the <Iframe> element. It can be used together with the sandbox and seamless attributes.
Syntax:
iframeObject.srcdociframeObject.srcdoc = HTML_codeProperty Values:
Return Value: It returns a string value that specifies the HTML content of the page that is displayed in the Iframe element.
Example 1: This example illustrates how to return the Iframe srcdoc property.
Output:
Example 2: This example illustrates how to set the Iframe srcdoc property.
Output:
Supported Browsers: The browsers supported by HTML DOM IFrame srcdoc Property are listed below: