Vue.js enable disable input field
home
Run
screen_rotation
fullscreen
cloud_download
<html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.0/vue.js"></script> </head> <body> <div id="app"> <input type="text" :disabled="isDisabled"> <button @click="isDisabled = !isDisabled">Enable/Disable</button> </div> <script> new Vue({ el: '#app', data: { isDisabled: false } }) </script> </body> </html>
<html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.0/vue.js"></script> </head> <body> <div id="app"> <input type="text" :disabled="isDisabled"> <button @click="isDisabled = !isDisabled">Enable/Disable</button> </div> <script> new Vue({ el: '#app', data: { isDisabled: false } }) </script> </body> </html>
Copyrights@tutorialsplane.com