菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码:
点击运行
保存
<!DOCTYPE html> <html> <head> <script src="/try/demo_source/loadxmldoc.js"> </script> </head> <body> <script> xmlDoc=loadXMLDoc("/try/demo_source/books.xml"); x=xmlDoc.getElementsByTagName('title'); for (i=0;i<x.length;i++) { document.write(x[i].childNodes[0].nodeValue); document.write("<br>"); } </script> </body> </html>
运行结果