﻿// JScript 文件

var xmlhttp;
function GetData()
{
    document.getElementById("divContent").innerHTML = "<div style='width:100%;text-align:center;vertical-align:middle;'>数据加载，请稍候...</div>";
	//创建异步对象
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    //判断状态事件的方法
    xmlhttp.onreadystatechange = stateChange;
    //加载服务器－注意无参数
    xmlhttp.Open("GET","ShowInfoPage.ashx" + window.location.search,true);
    //发送请求－无参数
    xmlhttp.Send(null);
          
        
}

function stateChange()
{
   
   //readystate==4表示请求已完成
   if(xmlhttp.readystate==4)
   {

     //status==200表示已经成功返回
     if(xmlhttp.status==200)
     {
        //动态创建元素显示获取的数据
        document.getElementById("divContent").innerHTML = xmlhttp.responseText;
     }

   }
   
}

GetData();



