File: example.html

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   JavaScript Base64 Encode and Decode   example.html   Download  
File: example.html
Role: Example script
Content type: text/plain
Description: EXAMPLE
Class: JavaScript Base64 Encode and Decode
Encode and decode data in base64 format in pure JS
Author: By
Last change: Update of example.html
Date: 2 years ago
Size: 553 bytes
 

Contents

Class file image Download
<html> <head> <script src="base64.min.js" type="text/javascript"></script> <script type="text/javascript"> var bs64 = new Base64(); var decoded = bs64.decode("VEVTVDEyMw=="); var encoded = bs64.encode("TEST123"); console.log('Encoded: ' + encoded); console.log('Decoded: ' + decoded); </script> </head> <body> <div id="example"></div> <script type="text/javascript"> var exmpl = document.getElementById('example'); exmpl.innerHTML = 'Encoded: ' + encoded + '<br />' + 'Decoded: ' + decoded; </script> </body> </html>