案例:XML 实例     状态:不可编辑再运行    进入横版
x
With a HEAD request, a server will return the headers of a resource (not the resource itself). This means you can find out the Content-Type or Last-Modified of a document, without downloading it itself.
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
var xmlhttp
5
6
function loadXMLDoc(url)
7
{
8
xmlhttp=null
9
// code for Mozilla, etc.
10
if (window.XMLHttpRequest)
11
  {
12
  xmlhttp=new XMLHttpRequest()
13
  }
14
// code for IE
15
else if (window.ActiveXObject)
16
  {
17
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
18
  }
19
if (xmlhttp!=null)
20
  {
21
  xmlhttp.onreadystatechange=state_Change
22
  xmlhttp.open("GET",url,true)
23
  xmlhttp.send(null)
24
  }

 运行结果 
 北美留学生论坛