您的位置:首页 > 其它

科讯商业版中用到的ajax空间与分页函数

2014-05-27 10:01 309 查看
参考地址:http://www.verydemo.com/demo_c107_i11844.html
科讯sql商业版中用到的ajax空间与分页函数,他们的js代码学习是非常不错的

//ajax 控件

function PageAjax(){

var xhrObj=null;

if(window.XMLHttpRequest)

{

xhrObj=new XMLHttpRequest();

}

else if(window.ActiveXObject)

{

try{

xhrObj=new ActiveXObject("Microsoft.XMLHTTP");

}

catch(e1)

{

try{

xhrObj=new ActiveXObject("MSXML2.XMLHTTP");

}

catch(e2){

try{

xhrObj=new ActiveXObject("MSXML3.XMLHTTP");

}

catch(e3){

alert("创建Ajax失败:"+e3)

}

}

}

}

else

{

alert("未能识别的浏览器");

}

return xhrObj;

}

function Page(curPage,labelid,classid,installdir,url,refreshtype,specialid)

{

this.labelid=labelid;

this.classid=classid;

this.url=url;

if (labelid.substring(0,5)=="{SQL_")

{

var slabelid=labelid.split('(')[0];

slabelid=slabelid.replace("{","");

this.c_obj="c_"+slabelid;

this.p_obj="p_"+slabelid;

}

else

{

this.c_obj="c_"+labelid;

this.p_obj="p_"+labelid;

}

this.installdir=installdir;

this.refreshtype=refreshtype;

this.specialid=specialid;

this.page=curPage;

loadData(1);

}

function loadData(p)

{ this.page=p;

var …………………………………………………………………………
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: