-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoreinputs.html
More file actions
74 lines (65 loc) · 1.88 KB
/
moreinputs.html
File metadata and controls
74 lines (65 loc) · 1.88 KB
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="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Alpine JS</title>
<script
defer
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"
></script>
</head>
<body>
<div x-data="{agreed: false}">
<input type="checkbox" x-model="agreed" />
<span x-show="agreed"> You have agreed the terms and conditions. </span>
</div>
<hr />
<div x-data="{records: []}">
<input type="checkbox" name="record_1" x-model="records" value="1" />
<input type="checkbox" name="record_2" x-model="records" value="2" />
<input type="checkbox" name="record_3" x-model="records" value="3" />
<br />
<span x-text="records"></span>
</div>
<hr />
<form
x-data="{
users: [],
deleteUsers() {
console.log(this.users);
}
}"
@submit.prevent="deleteUsers"
>
<input type="checkbox" x-model="users" value="1" /> Yanik Kumar
<input type="checkbox" x-model="users" value="2" /> Believe Master
<input type="checkbox" x-model="users" value="3" /> Coding Ninja
<br />
<button>Delete</button>
</form>
<hr />
<div
x-data="{
plan: ''
}"
>
<select x-model="plan">
<option value="">Please Choose</option>
<option value="yearly">Yearly</option>
<option value="monthly">Monthly</option>
</select>
<span x-show="plan" x-text="`You've choosen the ${plan} plan`"></span>
</div>
<hr />
<div
x-data="{
plan: 'monthly'
}"
>
<input type="radio" name="plan" value="monthly" x-model="plan" /> Monthly
<input type="radio" name="plan" value="yearly" x-model="plan" /> Yearly
<span x-show="plan" x-text="`You've choosen the ${plan} plan`"></span>
</div>
</body>
</html>