Vue.js encode decode string to Base64
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
<!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.js"></script> </head> <body> <div id="app"> <p>String = {{ str }}</p> <p>Decoded Base64 String = {{decodedStr}}</p> <button @click="myFunction()">Click Me</button> </div> <script> new Vue({ el: '#app', data: { str:"SGVsbG8gV29ybGQh", decodedStr:'' }, methods:{ myFunction: function () { this.decodedStr = atob(this.str); } } }); </script> </body> </html>
<!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.js"></script> </head> <body> <div id="app"> <p>String = {{ str }}</p> <p>Decoded Base64 String = {{decodedStr}}</p> <button @click="myFunction()">Click Me</button> </div> <script> new Vue({ el: '#app', data: { str:"SGVsbG8gV29ybGQh", decodedStr:'' }, methods:{ myFunction: function () { this.decodedStr = atob(this.str); } } }); </script> </body> </html>
Copyrights@tutorialsplane.com