封装XMLHTTP
来源:互联网 发布:过山车之星优化 编辑:程序博客网 时间:2024/05/01 08:49
// JavaScript Document
function translate(){
this.method="get";
this.url="http://localhost/padoo/request.html";
this.asyn=true;
}
translate.prototype={
string:null,
element:null,
parameter:null,
method:null,
url:null,
asyn:null,
setMethod:function(method){
this.method=method;
},
setURL:function(url){
this.url=url;
},
setAsyn:function(asyn){
this.asyn=asyn
},
recv:function(){
var xmlhttp=null;
try{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e0){
try{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e1){
xmlhttp=new XMLHttpRequest();
}
}
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
if(xmlhttp.status==200){
string=xmlhttp.responseText;
}
}
}
xmlhttp.open(this.method,this.url,this.asyn);
xmlhttp.send(this.parameter);
}
}
var procedure=new translate();
procedure.recv();
function translate(){
this.method="get";
this.url="http://localhost/padoo/request.html";
this.asyn=true;
}
translate.prototype={
string:null,
element:null,
parameter:null,
method:null,
url:null,
asyn:null,
setMethod:function(method){
this.method=method;
},
setURL:function(url){
this.url=url;
},
setAsyn:function(asyn){
this.asyn=asyn
},
recv:function(){
var xmlhttp=null;
try{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e0){
try{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e1){
xmlhttp=new XMLHttpRequest();
}
}
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
if(xmlhttp.status==200){
string=xmlhttp.responseText;
}
}
}
xmlhttp.open(this.method,this.url,this.asyn);
xmlhttp.send(this.parameter);
}
}
var procedure=new translate();
procedure.recv();
- 封装XMLHTTP
- XMLHTTP对象封装技术
- xmlhttp对象的简单封装
- xmlhttp对象的简单封装
- 封装好的客户端请求xmlhttp处理
- XMLHTTP
- xmlHTTP
- XMLHTTP
- XMLHTTP
- xmlhttp
- xmlhttp
- xmlhttp
- XMLHTTP
- XMLHTTP
- XmlHttp
- xmlHttp
- XMLHTTP
- xmlHTTP
- IIS中的MIME格式,按类型/子类型排序
- mpeg2
- 欢迎进群...5623253,编程思想...这里需要高手.
- 日文CGI中文化教學
- java访问数据库
- 封装XMLHTTP
- Coding Rules
- MsAjax Lib-> Boolean 类型扩展
- 嘿嘿
- MsAjax Lib-> Boolean.parse 函数
- 禁止自动共享
- 十堰的经典小吃!!
- 强烈推荐!007大战黑衣人 胡戈新作!
- 新的一年。。。