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

