English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
namespaceURIThe read-only property returns the namespace URI of the element; if the element is not in a namespace, it returns null.
Note:The element inherits the namespace of its parent element, so all elements in an XHTML document have the namespace URI 'http://www.w3.org/1999/xhtml.
element.namespaceURI
var x = document.documentElement.namespaceURI;Test See‹/›
All browsers fully support the namespaceURI property:
Property | |||||
namespaceURI | Yes | Yes | Yes | Yes | Yes |
Return Value: | A string representing the URI of the element's namespace; if the element is not in a namespace, it returnsnull |
---|---|
DOM Version: | DOM 2Level |
HTML DOM Reference:isDefaultNamespace() method