工作中需要用到,在stackoverflow中找到的,实践证明可用. function decode_base64(s) { var e = {}, i, k, v = [], r = '', w = String.fromCharCode; var n = [ [65, 91], [97, 123], [48, 58], [43, 44], [47, 48] ]; for (z in n) { for (i = n[z][0]; i < n[z][1]; i++) { v.push(w(i))