<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html> 【程序编程相关:VBScript 函数集】 【推荐阅读:計算程序的執行時間】<head> 【扩展信息:多附件、带有预览功能的HTML页面】 <title> practice on xml operation </title></head>
<body onload="addnewnode()">
</body>
</html> <script> function addnewnode() { var strnode = "<book>"; strnode = strnode + "<code>f5678</code>"; strnode = strnode + "</book>";var xmldoc = new activexobject("microsoft.xmldom");
xmldoc.async="false"; if(!xmldoc.loadxml(strnode)) { document.write("fail to build an xml file"); } else { document.write("<b>original xml file:</b>"); document.write("<xmp>" + xmldoc.xml + "</xmp>");//add price node
var objnewnode = xmldoc.createelement("price"); ... 下一页