screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h1>Vue js Encode password to base64</h1> <label for="password">Password:</label> <input type="password" id="password" v-model="password"> <button @click="encodePassword">Encode Password</button> <small v-if="result">{{result}}</small> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { password: "password", result: '' }; }, methods: { encodePassword() { let encodedPassword = btoa(this.password); this.result = encodedPassword; }, }, }) </script> <style scoped> #app { font-family: Arial, sans-serif; max-width: 400px; margin: 0 auto; padding: 20px; background-color: #f2f2f2; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } h1 { font-size: 24px; margin-bottom: 20px; text-align: center; } label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: bold; } input[type="password"] { display: block; width: 100%; padding: 10px; border: none; border-radius: 5px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); font-size: 16px; margin-bottom: 20px; } button { display: block; width: 100%; padding: 10px; background-color: #007bff; color: #fff; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold; transition: background-color 0.3s ease; } button:hover { background-color: #0062cc; } small { display: block; margin-top: 20px; font-size: 14px; color: #777; } </style> </body> </html>