commit | author | age
|
38b8f3
|
1 |
<!DOCTYPE html> |
CM |
2 |
<html lang="en"> |
|
3 |
<head> |
|
4 |
<meta charset="UTF-8" /> |
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
6 |
<title>Vue Basics</title> |
|
7 |
<link |
|
8 |
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" |
|
9 |
rel="stylesheet" |
|
10 |
/> |
|
11 |
<link rel="stylesheet" href="styles.css" /> |
778328
|
12 |
<script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js" defer></script> |
38b8f3
|
13 |
<script src="app.js" defer></script> |
CM |
14 |
</head> |
|
15 |
<body> |
|
16 |
<header> |
|
17 |
<h1>Vue Events</h1> |
|
18 |
</header> |
|
19 |
<section id="events"> |
|
20 |
<h2>Events in Action</h2> |
|
21 |
<button v-on:click="add(5)">Add 5</button> |
|
22 |
<button v-on:click="sub(5)">Subtract 5</button> |
778328
|
23 |
<p v-once>Starting counter: {{ counter }}</p> |
38b8f3
|
24 |
<p>Result: {{ counter }}</p> |
778328
|
25 |
<input |
CM |
26 |
type="text" |
|
27 |
v-on:input="setName($event)" |
|
28 |
v-on:keyup.enter="confirmInput()" |
|
29 |
/> |
|
30 |
<p>Il tuo nome: {{ confirmedName }}</p> |
|
31 |
<form v-on:submit.prevent="submitForm"> |
|
32 |
<input type="text" /> |
|
33 |
<button>Sign Up</button> |
|
34 |
</form> |
38b8f3
|
35 |
</section> |
CM |
36 |
</body> |
|
37 |
</html> |