screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> </head> <body> <div id="app"> <h3>Vue Checkbox Readonly </h3> <label> <input type="checkbox" v-model="isChecked" :disabled="isReadOnly" /> This checkbox is read-only. </label> <br /> <button @click="isReadOnly = !isReadOnly">{{isReadOnly?'Make Editable':'Make Readonly'}}</button> </div> <script type="module"> const app = Vue.createApp({ data() { return { isChecked: true, isReadOnly: true }; }, }); app.mount('#app'); </script> <style scoped> #app { font-family: Arial, sans-serif; padding: 20px; } label { display: block; margin-bottom: 10px; font-weight: bold; } input[type="checkbox"] { margin-right: 10px; vertical-align: middle; } button { margin-top: 10px; padding: 10px 20px; background-color: #007bff; border: none; color: #fff; border-radius: 5px; cursor: pointer; } button:hover { background-color: #0062cc; } </style> </body> </html>