- <html>
- <body>
- <scripttype="text/javascript">
- try//InternetExplorer
- {
- xmlDoc=newActiveXObject("Microsoft.XMLDOM");
- }
- catch(e)
- {
- try//Firefox,Mozilla,Opera,etc.
- {
- xmlDoc=document.implementation.createDocument("","",null);
- }
- catch(e){alert(e.message)}
- }
- try
- {
- xmlDoc.async=false;
- xmlDoc.load("books.xml");
- document.write("xmlDocisloaded,readyforuse");
- }
- catch(e){alert(e.message)}
- </script>
- </body>
- </html>
解析XML文件
最新推荐文章于 2024-02-16 13:55:33 发布