﻿ 
   var xmlHttp;
    var islogin=true;
    function createXmlHttpRequest()
    {
        if(window.XMLHttpRequest)
        {
            xmlHttp=new XMLHttpRequest();
        
            if(xmlHttp.overrideMimeType)
                {
                    xmlHttp.overrideMimeType("text/xml");
                }
        }
        else if(window.ActiveXObject)
        {
            try
            {
                xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");   
            }
            catch(e)
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
            }
        }
        if(!xmlHttp)
        {
            window.alert("你的浏览器不支持创建XMLhttpRequest对象");
        }
        return xmlHttp;
    }  
function loadGong()
{
     createXmlHttpRequest();
　   var url="session.aspx";
　   xmlHttp.open("post",url,true);
 　  xmlHttp.onreadystatechange=loadGongResult;
     xmlHttp.send(null);
}
function loadGongResult()
{
    if(xmlHttp.readyState==4)//服务器响应状态
    {
        if(xmlHttp.status==200)//代码执行状态
        {
             if(xmlHttp.responseText!="")
             { 
                document.getElementById("myTd").innerHTML=xmlHttp.responseText;
             } 
             else
             {
                document.getElementById("myTd").innerHtml="暂无信息";
             }
        }
    }
}


