<p id="demo">点击按钮来查看指定的命名空间是否是默认的。</p>
<button onclick="myFunction()">试一下</button>
var d=document.documentElement;
var x=document.getElementById("demo");
x.innerHTML=d.isDefaultNamespace("http://www.w3.org/1999/xhtml");
<p><b>注释:</b>Internet Explorer 8 以及更早的版本不支持 isDefaultNamespace 方法。</p>