Get the local name of the body element:
The result will be:
The localName property returns the local name of the specified node.
The localName property returns the name of element nodes and attribute nodes, for other node types the return value is null.
![]()
The localName property is supported in all major browsers.
Note: Internet Explorer 8 and earlier does not support this property.
| Return Value: | A String, representing the name of the node |
|---|---|
| DOM Version | Core Level 2 |
Node Object
Your message has been sent to W3Schools.