<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en"
<title> New D Ocument </title>
<meta name= "generator" content= "EditPlus"
<meta name= "Author" content= "" >
<meta name= "Keywords" content= ""
<meta name= "Description" "
content=;
<body>
<script language= "JavaScript" type= "Text/javascript" >
<!--
Create a browser-compatible XMLHttpRequest object
var xmlhttp;
try{
xmlhttp= new ActiveXObject (' msxml2.xmlhttp ');
}catch (e) {
try{
xmlhttp= new ActiveXObject (' microsoft.xmlhttp ');
}catch (e) {
try{
xmlhttp= new XMLHttpRequest ();
}catch (e) {}
}
}
To define an event handler for a XMLHttpRequest object
Xmlhttp.onreadystatechange=function () {
if (xmlhttp.readystate==4) {
if (xmlhttp.status==200) {
alert (Xmlhttp.responsetext);
}else{
alert (xmlhttp.status);
}
}
}
Create a connection
Xmlhttp.open ("Get", "a.html");
Send Request
Xmlhttp.send (NULL);
-->
</script>
</body>
A.html contents are as follows:
hello,ajax!