<html> <head> <script type="text/javascript" src="/upload/file/xml/loadxmldoc.js"> </script> </head> <body> <script type="text/javascript"> xmlDoc=loadXMLDoc("/upload/file/xml/books.xml"); var x=xmlDoc.getElementsByTagName("title")[0].childNodes[0] x.appendData(" Cooking"); document.write(x.data); </script> </body> </html>
编辑上面的文字,按下“查看结果”,效果会显示在右边 Create by 软晨网(RuanChen.com)