AJAX问题不能执行
yzone 2009-06-15 05:27:09 var xmlHttp;
function createXMLHttpRequest()
{
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
}
//更新数据
function AjaxUpdate(num)
{
createXMLHttpRequest();
//var url = "Update.aspx?id="+num+"&&time="+new Date().getTime();
var querystring = "test2.aspx?id="+num+"×tamp="+new Date().getTime();
xmlHttp.onreadystatechange=getstate;
xmlHttp.open("GET",querystring,true);
xmlHttp.send(null);
}
//状态判断
function getstate()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.Status==200)
{
alert(xmlHttp.responseText);
//document.getElementById("message").innerHTML = xmlHttp.responseXML.getElementsByName("res")[0].firstChild.data;
}
}
}
不能跳入test2.aspx页面