function string10to62(number) { var chars = '0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ'.split(''), radix = chars.length, qutient = +number, arr = []; do { mod = qutient % radix; qutient = (qutient - mod) / radix; arr.unshift(chars[mod]); } while (qutient); return arr.join(''); } function string62to10(number_code) { var chars = '0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ', radix = chars.length, number_code = String(number_code), len = number_code.length, i = 0, origin_number = 0; while (i < len) { origin_number += Math.pow(radix, i++) * chars.indexOf(number_code.charAt(len - i) || 0); } return origin_number; }
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索10进制
62进制
javascript 二进制、javascript 16进制、javascript 二进制流、javascript 十六进制、javascript 进制转换,以便于您获取更多的相关知识。
时间: 2024-10-18 07:31:15