English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
isDefaultNamespace()The method accepts a namespace URI as a parameter, and returns a boolean value true if the namespace is the default namespace on the given node, otherwise returns false.
node.isDefaultNamespace(namespaceURI)
var html = document.documentElement; var x = html.isDefaultNamespace("http:",//www.w3.org/1999/xhtml");Test and See‹/›
The isDefaultNamespace() method is fully supported by all browsers:
Method | |||||
isDefaultNamespace() | Yes | Yes | Yes | Yes | Yes |
Parameter | Description |
---|---|
namespaceURI | The URI of the namespace you want to check |
Return Value: | A boolean value, returns true if the namespace is the default value, otherwise returns false |
---|---|
DOM Version: | DOM Level3 |
HTML DOM Reference:element.namespaceURI property