案例:XML 实例     状态:不可编辑再运行    进入横版
x
 
1
<html>
2
<head>
3
<script type="text/vbscript">
4
dim xmlhttp
5
6
function loadXMLDoc(url)
7
set xmlhttp=createObject("Microsoft.XMLHTTP")
8
xmlhttp.onreadystatechange=getRef("state_Change")
9
call xmlhttp.open("GET",url,true)
10
call xmlhttp.send()
11
end function
12
13
function state_Change()
14
if xmlhttp.readyState=4 then
15
  if xmlhttp.status=200 then
16
    alert("XML data OK")
17
    document.getElementById("A1").innerText=xmlhttp.status
18
    document.getElementById("A2").innerText=xmlhttp.statusText
19
    document.getElementById("A3").innerText=xmlhttp.responseText
20
  else
21
    alert("Problem retrieving XML data:" & xmlhttp.statusText)
22
  end if
23
end if
24
end function

 运行结果 
 北美留学生论坛