ajax.js
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- function InitAjax()
- {
- var ajax=false;
- try {
- ajax = new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e) {
- try {
- ajax = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (E) {
- ajax = false;
- }
- }
- if (!ajax && typeof XMLHttpRequest!='undefined') {
- ajax = new XMLHttpRequest();
- }
- return ajax;
- }
- function StatsAjax(_id,_1,_2,_3){
- switch(ajax.readyState){
- case 1:document.getElementById(_id).innerHTML = _1; break;
- case 2:document.getElementById(_id).innerHTML = _2; break;
- case 3:document.getElementById(_id).innerHTML = _3; break;
- case 4:document.getElementById(_id).innerHTML = "";
- }
- }