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: 1 month ago
Size: 553 bytes


Class file image Download
		<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);
	<div id="example"></div>
	<script type="text/javascript">
			var exmpl = document.getElementById('example');
			exmpl.innerHTML = 'Encoded: ' + encoded + '<br />' + 'Decoded: ' + decoded;