Get the name of an iframe:
The result of x will be:
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.
The name property is supported in all major browsers.
Return the name property:
Set the name property:
Value | Description |
---|---|
name | The name of the iframe |
Return Value: | A String, representing the name of the iframe |
---|
Change the name of an iframe:
HTML reference: HTML <iframe> name attribute