function reCode(b){
//***Author: Hutia
//last modified by shouhaimu(QQ:30836570)
//速度已提高近50倍
var glbEncode=new Array();
var t=rsB(b);
t=escape(t).replace(/%u/g,"").replace(/(.{2})(.{2})/g,"%$2%$1").replace(/%([A-Z].)%(.{2})/g,"@$1$2");
t=t.split("@");
var i=0,j=t.length,k;
while(++i<j)
{
k=t[i].substring(0,4);
if(!glbEncode[k])glbEncode[k]=escape(rsChar(eval("0x"+k))).substring(1,6);
t[i]=glbEncode[k]+t[i].substring(4);
}
return unescape(t.join("%"));
}
调用得VBS函数
Function rsB(vIn)
rsB = MidB(vIn,1)
End Function
Function rsChar(vIn)
rsChar = Chr(vIn)
End Function
posted on 2006-08-02 15:39
汪杰 阅读(799)
评论(1) 编辑 收藏 引用 所属分类:
javascript