HotCRC内的HexToQPCode()源码
菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.htmlfunction HexToQPCode(hexstr) {
var i, str, value, ch ,hexstrString;
hexstrString = "";
i = 0;
while(i < hexstr.length)
{
str = hexstr.substr(i, 2);
value = hextoint(str);
ch = String.fromCharCode(value);
if(ch != "=") {
i += 2;
}
else {
ch = hexstr.substr(i + 2, 4);
str = HexToAscii(ch);
i += 6;
}
hexstrString += str;
}
return hexstrString;//输出3N个字节
}
https://bbs.21ic.com/data/attachment/forum/202309/22/101124qp474qggq7ix7pjx.jpg.thumb.jpg
页:
[1]