Most Powerful Open Source ERP

'btoa' is undefined

  • Last Update:2013-02-01
  • Version:001
  • Language:en
文件编号
'btoa' is undefined
Publication Information
已嵌入

If your browser does not have native base64 converter ("btoa" and "atob"), like Internet Explorer 9, you can import this script to your html page and associate Base64 methods to global functions.

<html>
  <head>
    <script type="text/javascript" src="webtoolkit.base64.js"></script>
    <script type="text/javascript">
      <!--
      if (typeof btoa === "undefined") {
        _keyStr = Base64._keyStr;
        btoa = Base64.encode;
        atob = Base64.decode;
      }
      // -->
    </script>
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

Let me know if there is better solutions!