﻿var xmlHttp8
function LoginOut() {

    xmlHttp8 = GetXmlHttpObject8();
    if (xmlHttp8 == null) {
        alert("您的浏览器不支持AJAX！");
        return;
    }


    var url = "/Ajax/LoginOut.aspx";
    url = url + "?sid=" + Math.random();

    xmlHttp8.onreadystatechange = stateChanged8;
    xmlHttp8.open("GET", url, true);
    xmlHttp8.send(null);
}

function stateChanged8() {

    if (xmlHttp8.readyState == 4) {

        if (xmlHttp8.status == 200) {
          
            if (xmlHttp8.responseText == "False") {
                alert ("退出失败");
            } else {
                location.href=location.href;
            }
        }
        else {
            alert("HTTP 验证错误，状态码：" + xmlHttp8.status);
        }
    }
}

function GetXmlHttpObject8() {
    var xmlHttp8 = null;
    try {
        // Firefox, Opera 8.0+, Safari
        xmlHttp8 = new XMLHttpRequest();
    }
    catch (e) {
        // Internet Explorer
        try {
            xmlHttp8 = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            xmlHttp8 = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp8;
}




