-
Notifications
You must be signed in to change notification settings - Fork 0
/
events-modifiers.html
74 lines (59 loc) · 1.92 KB
/
events-modifiers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eventos - Modificadores</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
<div id="events">
<div class="container">
<h1>Hcode Treinamentos</h1>
<form action="" class="form">
<div class="row">
<div class="col">
<div class="form-group">
<label for="">Nome</label>
<input type="text" class="form-control" name="username" placeholder="Digite seu nome">
</div>
</div>
<div class="col">
<div class="form-group">
<label for="">Email</label>
<input type="email" class="form-control" name="email" placeholder="Digite seu email">
</div>
</div>
</div>
<div class="form-group">
<label for="">Digite sua mensagem</label>
<textarea class="form-control" name="message" id="" cols="30" rows="10"></textarea>
</div>
<button @click.prevent="send($event)" type="submit" class="btn btn-primary">Enviar formulário</button>
</form>
<hr>
<a href="https://www.youtube.com.br/hcodebrasil" @click.prevent.once="alert">YouTube Hcode</a>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
let app = new Vue({
el: '#events',
data: {
},
methods: {
alert() {
alert('Olá');
},
send(event) {
let form = event.target.form;
let data = new FormData(form);
for (let value of data.entries()) {
console.log(`${value[0]}: ${value[1]}`);
}
}
}
})
</script>
</body>
</html>