; //http.setRequestHeader("Content-Type","gb2312");
this.setRequestHeader = function(mime){
if(!this.checkHttpRequest()){
return false;
}
try{
this.HttpRequest.setRequestHeader("Content-Type", mime);
return true;
}catch(e){
if(e instanceof Error){
Alert("修改MIME类别错误");
return false;
}
}
}
//设置状态改变的事件触发器
this.setOnReadyStateChange = function(funHandle, Param){
if(!this.checkHttpRequest()){
return false;
}
this.ProcessRequestFunction = funHandle;
this.ProcessRequestParam = Param;
return true;
}
this.setLoadingImg = function(ImgID){
this.LoadingImg = ImgID;
}
//建立HTTP连接
//open("method","URL"[,asyncFlag[,"userName"[, "password"]]])
this.Open = function(method, url, async, username, psw){
if(!this.checkHttpRequest()){
return false;
}
this.openMethod = method;
this.openURL = url;
this.openAsync = async;
if((this.openMethod==null) || ((this.openMethod.toUpperCase()!="GET")&&(this.openMethod.toUpperCase()!="POST")&&(this.openMethod.toUpperCase()!="HEAD"))){
Alert("请指定HTTP请求的方法,为Get、Post 或者Head");
return false;