案例:XSL案例     状态:不可编辑再运行    进入横版
x
else if (document.implementation && document.implementation.createDocument)
 
1
<html>
2
<body>
3
<script type="text/javascript">
4
function loadXMLDoc(dname)
5
{
6
if (window.XMLHttpRequest)
7
  {
8
  xhttp=new XMLHttpRequest();
9
  }
10
else
11
  {
12
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
13
  }
14
xhttp.open("GET",dname,false);
15
xhttp.send("");
16
return xhttp.responseXML;
17
}
18
19
xml=loadXMLDoc("/example/xmle/books.xml");
20
path="/bookstore/book/price/text()"
21
// code for IE
22
if (window.ActiveXObject)
23
{
24
var nodes=xml.selectNodes(path);

 运行结果 
 北美留学生论坛