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

来源:互联网 发布:怎么在淘宝上卖lol号 编辑:程序博客网 时间:2024/06/01 10:17

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);

原创粉丝点击