⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 base64.js

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 JS
字号:
/*	Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.	Available via Academic Free License >= 2.1 OR the modified BSD license.	see: http://dojotoolkit.org/license for details*/if(!dojo._hasResource["dojox.encoding.base64"]){dojo._hasResource["dojox.encoding.base64"]=true;dojo.provide("dojox.encoding.base64");(function(){var p="=";var _2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var _3=dojox.encoding;_3.base64.encode=function(ba){var s=[],l=ba.length;var rm=l%3;var x=l-rm;for(var i=0;i<x;){var t=ba[i++]<<16|ba[i++]<<8|ba[i++];s.push(_2.charAt((t>>>18)&63));s.push(_2.charAt((t>>>12)&63));s.push(_2.charAt((t>>>6)&63));s.push(_2.charAt(t&63));}switch(rm){case 2:var t=ba[i++]<<16|ba[i++]<<8;s.push(_2.charAt((t>>>18)&63));s.push(_2.charAt((t>>>12)&63));s.push(_2.charAt((t>>>6)&63));s.push(p);break;case 1:var t=ba[i++]<<16;s.push(_2.charAt((t>>>18)&63));s.push(_2.charAt((t>>>12)&63));s.push(p);s.push(p);break;}return s.join("");};_3.base64.decode=function(_b){var s=_b.split(""),_d=[];var l=s.length;while(s[--l]==p){}for(var i=0;i<l;){var t=_2.indexOf(s[i++])<<18;if(i<=l){t|=_2.indexOf(s[i++])<<12;}if(i<=l){t|=_2.indexOf(s[i++])<<6;}if(i<=l){t|=_2.indexOf(s[i++]);}_d.push((t>>>16)&255);_d.push((t>>>8)&255);_d.push(t&255);}while(_d[_d.length-1]==0){_d.pop();}return _d;};})();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -