function Ajax(){
var XmlHttp = false,isComplete = false;
/*@cc_on
@if (@_jscript_version >= 5)
try {
XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try {
XmlHttp = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e2){
XmlHttp = false
}
}
@end
@*/
if (!XmlHttp && typeof XMLHttpRequest != 'undefined')
{XmlHttp = new XMLHttpRequest()}
this.open = function(url, method, feedback,process, arg,asyc)
{
if (!XmlHttp) return false;
isComplete = false;
var asy;
if(asyc==null){asy=true;}
else{asy=false;}
if(arguments.length==2){feedback=method;method="post";}
method = method.toUpperCase();
try {
if (method == "GET")
{
XmlHttp.open(method, url+"?"+arg,asy);
arg = "";
}
else
{
XmlHttp.open(method, url, asy);
try{
// XmlHttp.setRequestHeader("Content-length", parameters.length);
XmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
XmlHttp.setRequestHeader("Connection","close");}
catch(e){}
}
XmlHttp.send(arg);
XmlHttp.onreadystatechange = function(){
if (XmlHttp.readyState == 4 && !isComplete)
{
isComplete = true;
if(XmlHttp.status==200||XmlHttp.status==0){
try{feedback(XmlHttp.responseText,XmlHttp);}catch(e){}}
else{try{feedback(XmlHttp.status);}catch(e){}}
}
else
{try{process(XmlHttp.readyState);}catch(e){}}
};
}
catch(z) { return false; }
return true;
};
return this;
};
Ajax在PHP开发中的应用[转] - Jun 27, 2006
利用PHP和AJAX创建RSS聚合器 - May 10, 2006
Ajax文档 - May 01, 2006
AJAX掀起桌面网络开发的新篇章 - Apr 19, 2006
Ajax专题 - Apr 16, 2006
DWR version 2.0 milestone 1 is released - Apr 15, 2006
Better File Uploads with AJAX and JavaServer Faces - Apr 11, 2006