|
本帖最后由 kxing 于 2010-6-10 15:10 编辑
麻烦高手们帮忙将此asp函数转换为au3
function decode(url){
var len = url.length;
var decurl = "";
var asc_arr1 = [], asc_arr2 = [];
var key = sertim % 26;
key = key ? key : 1;
function init(head, bottom, middle){
for (var i = head; i <= bottom; i++) {
asc_arr1 = i + middle;
asc_arr2[i + middle] = i;
}
}
init(0, 9, 48);
init(10, 35, 55);
init(36, 61, 61);
for (var i = 0; i < len; i++) {
var word = url.charAt(i);
if (/[A-Za-z0-9]/.test(word)) {
var pos = asc_arr2[url.charCodeAt(i)] - key;
if (pos < 0)
pos += 62;
word = String.fromCharCode(asc_arr1[pos]);
}
decurl += word;
}
return decurl;
}
本人对asp不熟悉,多谢了!!!! |
|