HTML DOM isDefaultNamespace method
Examples
Check-defined namespace is the default namespace:
document.documentElement.isDefaultNamespace('http://www.w3.org/1999/xhtml');
Output:
true
try it"
Definition and Usage
If the specified namespace is the default, isDefaultNamespace () method returns true, otherwise returns false.
Browser Support
All major browsers support isDefaultNamespace method
Note: Internet Explorer 8 and earlier versions of IE does not support this method.
grammar
node.isDefaultNamespace(namespaceURI)
parameter
参数 | 类型 | 描述 |
---|---|---|
namespaceURI | String | 必须。你想要检查的命名空间URI。 |
return value
类型 | 描述 |
---|---|
Boolean | 如果是默认的命名空间返回 true,否则返回 false。 |
technical details
DOM version | Core Level 3 Node Object |
---|