Cristiano Magro
2024-12-26 7783284353229af089627814071f20707b06d045
02 - basic/basics-03-events-starting-code/index.html
@@ -9,8 +9,7 @@
      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>
@@ -21,9 +20,18 @@
      <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>