<html>
<body>
<p>单击该按钮可查看指定的命名空间是否为默认命名空间。</p>
<button onclick="myFunction()">试一试</button>
<p><strong>注意:</strong>Internet Explorer 8 及更早版本不支持 isDefaultNamespace 方法。</p>
<p id="demo"></p>
<script>
function myFunction() {
var d = document.documentElement;
var x = d.isDefaultNamespace("http://www.w3.org/1999/xhtml");
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>