| | |
| | | rel="stylesheet" |
| | | /> |
| | | <link rel="stylesheet" href="styles.css" /> |
| | | <script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js"></script> |
| | | |
| | | <script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js" defer></script> |
| | | <script src="app.js" defer></script> |
| | | </head> |
| | | <body> |
| | |
| | | <h2>Events in Action</h2> |
| | | <button v-on:click="add(5)">Add 5</button> |
| | | <button v-on:click="sub(5)">Subtract 5</button> |
| | | <p v-once>Starting counter: {{ counter }}</p> |
| | | <p>Result: {{ counter }}</p> |
| | | <input type="text" v-on:input="setName"> |
| | | <p>Il tuo nome: {{ name }}</p> |
| | | <input |
| | | type="text" |
| | | v-on:input="setName($event)" |
| | | v-on:keyup.enter="confirmInput()" |
| | | /> |
| | | <p>Il tuo nome: {{ confirmedName }}</p> |
| | | <form v-on:submit.prevent="submitForm"> |
| | | <input type="text" /> |
| | | <button>Sign Up</button> |
| | | </form> |
| | | </section> |
| | | </body> |
| | | </html> |