您的位置:首页 > 编程语言 > ASP

ASP.NET一个简单的无刷新删除

2009-06-03 15:33 399 查看
var xmlHttp
if(window.ActiveXObject)

{

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHtpRequest)

{
xmlHttp=new XMLHttpRequest();
}

xmlHttp.open("GET","DelPatan.aspx?PatanCode="+PatanID,true);

xmlHttp.onreadystatechange=function()

{

if(xmlHttp.readyState==4 && xmlHttp.status==200)
{
if (trim(xmlHttp.responseText)=="0")
{
window.location.href="SF_0011.aspx";
}
else
{
if (trim(xmlHttp.responseText).length < 400)
{
alert(xmlHttp.responseText);
}
window.location.href="SF_0011.aspx";
}

}

}

xmlHttp.send(null);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐