BrU32

JS Base 64 Encoding/Decoding Web Application SRC V3 SRC

Sep 13th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <html>
  2. <body bgcolor="skyblue">
  3. <font color="white">
  4. <center>
  5. <title>Base64 Encoder/Decoder</title>
  6. <font color="darkblue">
  7. <header>
  8.  
  9. <b><i>
  10. <p><h2>Base64 Encoder/Decoder</p</h2>
  11. </header>
  12. <button style="background-color:skyblue;color:white;width:180px;height:28px" onclick="javascript:Test();"><b><i><font size="53"></font>Base64 Encode String </button>
  13. <p>
  14. <button style="background-color:skyblue;color:white;width:180px;height:28px" onclick="javascript:Test1();"><b><i>Base64 Decode String</button>
  15. <p id="testing">
  16. </font>
  17. </body>
  18. </html>
  19. <script>
  20. function Test(){
  21. var str=prompt('Please Enter A String Value:');
  22. var rep=str.replace("<","");
  23. var enc=btoa(rep);
  24. var dec=atob(enc);
  25. document.getElementById('testing').innerText="Input String:\n"+rep +"\nOutput String:\n" +enc;
  26. }
  27. </script>
  28.  
  29. <script>
  30. function Test1(){
  31. var str=prompt('Please Enter A String Value:');
  32. var rep=str.replace("<","");
  33. var enc=atob(rep);
  34. var dec=atob(enc);
  35. document.getElementById('testing').innerText="Input String:\n"+rep +"\nOutput String:\n" +dec;
  36. }
  37. </script>
  38. <center><font color="maroon"><font size="3px">Coded By DJ BrÜ &copy 2015-2016</font></center>
Add Comment
Please, Sign In to add comment