菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.html
function 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个字节
}
|