菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.html
- function QPCodeToHex(hexstring) {
- var i, value, str, hexstr;
- hexstr = "";
- for (i = 0; i < hexstring.length; i += 2)
- {
- value = hextoint(hexstring.substr(i, 2));
- if ((value >= 33 && value <= 60) || (value >= 62 && value <= 126)) {
- str = String.fromCharCode(value);
- }
- else {
- str = "=" + hexstring.substr(i, 2);
- }
- hexstr += str;
- }
- hexstr= AsciiToHex(hexstr);
- return hexstr;
- }

|