var ajaxCtrl = new function(){
this.create = function (){
if(window.XMLHttpRequest){
return new XMLHttpRequest();
}else{
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
this.dispose = function (ids){
var xmlHttp = this.create();
var id = document.getElementById(ids);
xmlHttp.onreadystatechange= function(){
if(xmlHttp.readyState==4){
var ss = xmlHttp.responseText;
id.innerHTML = ss;
}
}
xmlHttp.open("GET","show.jsp",true);
xmlHttp.send(null);
}
}
ajax函数 ajax技术
最新推荐文章于 2024-08-20 19:48:29 发布