- 博客(0)
- 资源 (1)
- 收藏
- 关注
jquery.base64.js
jQuery.base64.js
(feel free to write a bit about it)
You can check for btoa and atob support and refer to jQuery.base64
if (!window.btoa) window.btoa = $.base64.btoa
if (!window.atob) window.atob = $.base64.atob
Options
You can define some options per default, set them globally use the following syntax:
$.base64.utf8encode = true;
Utf8 encoding and decoding as global option, possibilities:
option description default
raw If false it encodes/decodes both, the input and output. true
utf8encode To encode only the input you can set encodung to true. false
utf8decode Same as above but for the output and decoding. false
You can override the global options by passing an extra parameter:
$.base64[property](<value>, options); / $.base64(<property>, <value>, options);
To enable UTF8-encoding pass true as the last paramter:
$.base64.atob(<value>, true);
$.base64('atob', <value>, true);
2017-08-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人