ajax函数  ajax技术

来源:互联网 发布:腾讯软件 编辑:程序博客网 时间:2024/06/03 17:20
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);}}

0 0
原创粉丝点击