mozillaxmldomexample2.htm
来自「这是javascript高级程序设计的源码」· HTM 代码 · 共 27 行
HTM
27 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Mozilla XML DOM Example</title>
</head>
<body>
<p>This example loads an XML file <em>asynchronously</em>.</p>
<script type="text/javascript">
var oXmlDom = document.implementation.createDocument("","",null);
oXmlDom.async = true;
oXmlDom.onload = function () {
alert("Tag name of the root element is " + oXmlDom.documentElement.tagName);
alert("The root element has this many children: " + oXmlDom.documentElement.childNodes.length);
};
oXmlDom.load("test.xml");
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?