IFrame name Property
Example
Get the name of an iframe:
Description
The name property sets or returns the value of the name attribute in an iframe element.
The name attribute specifies the name of an iframe, and can be used to reference the element in a JavaScript, or as the value of the target attribute of an <a> or <form> element, or the formtarget attribute of an <input> or <button> element.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| name | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the name property:
Set the name property:
Property Values
| Value | Description |
|---|---|
| name | The name of the iframe |
Technical Details
| Return Value: | A String, representing the name of the iframe |
|---|
More Examples
Example
Change the name of an iframe:
Related Pages
HTML reference: HTML <iframe> name attribute
❮ IFrame Object