#2
tang6882010-01-13 19:23
|
<html>
<head>
<title></title>
<script language="javascript" type="text/javascript">
var xmlHttp;
function createXMLHttpRequest()
{
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
xmlHttp=new XMLHttpRequest();
}
}
function startRequest()
{
createXMLHttpRequest();
xmlHttp.OnReadyStateChange=handlestateChange();
xmlHttp.open("GET","src.xml",true);
xmlHttp.send(null);
}
function handlestateChange()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
alert("the server replied with:"+xmlHttp.responseText);
}
}
</script>
</head>
<body>
<form action="#">
<input type="button" value="start Basic" onclick="startRequest();"/>
</form>
</body>
</html>