﻿// JScript 文件

var xmlHttp;
function createXMLHttpRequest() {

    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    else if (window.XMLHttpRequest) {

        xmlHttp = new XMLHttpRequest();
    }
}
function getyanzhengma() {

    createXMLHttpRequest(); 
    var queryString = "yzm.aspx?";
    xmlHttp.onreadystatechange = handleStateChange;
    xmlHttp.open("GET", queryString, true);
    xmlHttp.send(null);

}
function handleStateChange() {
    var y=document.getElementById("yzm");
    if(xmlHttp.readyState==4)
   {
        if(xmlHttp.status==200)
        {
           y.innerHTML="<a onclick=\"getyanzhengma();\" title=\"点击刷新\" style=\"cursor:pointer;\"><img align=\"absmiddle\" id=\"Image1\" src=\"yzm.aspx?"+"sajdfh="+Math.random()+"\" style=\"border-width:0px;\" /></a>" ;
        }
        else
        {
            y.innerHTML="200";
        }
  }
  else
  {
        y.innerHTML="4";
  }

}




