﻿// JScript 文件

function $(id)
{
    return document.getElementById(id);
}

function MyAjax(strUrl,postKind,strSend,callKind,callBack)
{
    
    this.xHttp=null;
    this.result=null;
    this.exec=function()
    {
        if(window.ActiveXObject)
        {
            this.xHttp=new ActiveXObject("Microsoft.XMLHTTP");
            
        }
        else if(window.XMLHttpRequest)
        {
            this.xHttp=new XMLHttpRequest();
            
        }
        
        var sSend;
        if(postKind=="GET")
        {
            sSend=null;
        }
        else
        {
            sSend=strSend;
        }
        
        this.xHttp.open(postKind,strUrl+"&now="+new Date().getTime(),callKind);
        this.xHttp.onreadystatechange=callBack;
        this.xHttp.send(sSend);
        
   
    }
   
   
    

}

