一个封装的Ajax类 用法: new Ajax().Request(url,cmd,async,method,postString,title) 参数: url: 请求页面URL(必填) cmd: 返回值处理函数(必填) async: 是否异步 ,(ture|false), 默认true method: 请求方式,(post|get), 默认get postString: 请求方式为post时,请求内容 title: 请求内容标题 复制代码 代码如下:// Ajax 封装 2007-3-13 function createXMLHttpRequest() { try { if (window.XMLHTTPRequest) { return new XMLHttpRequest(); } else if (window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } } catch (e) {alert("XMLHttpRequest对象无法创建!请检查IE安全设置!");} } function messageDiv(t) { var v = document.createElement("
" + " |