-
Notifications
You must be signed in to change notification settings - Fork 0
/
week6.html
92 lines (81 loc) · 2.79 KB
/
week6.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body style="background-color:red ;">
<p>Handling User Inputs</p>
<div id="goku">
<p1>First name</p1>
<input type="text" v-model.lazy="First Name" placeholder="First name here"><br>
<p1>Last name</p1>
<input type="text" v-model.trim="Last Name" placeholder="Last name here">
</div>
<p>Checkbox</p>
<div id="veg" class="d1">
<input type="checkbox" id="5G" value="Outstanding Connection" v-model="checkedNames" />
<label for="5G">5G</label>
<input type="checkbox" id="4G" value="Excellent Connection" v-model="checkedNames" />
<label for="4G">4G</label>
<input type="checkbox" id="3G" value="Good Connection" v-model="checkedNames" />
<label for="3G">3G</label>
<input type="checkbox" id="2G" value="Weak Connection" v-model="checkedNames" />
<label for="">2G</label>
<br />
<span>Checked names: {{ checkedNames }}</span>
</div>
<p>Dynamic Option Rendering</p>
<div id="beeru" class="d2">
<select v-model="selected">
<option v-for="option in options" v-bind:value="option.value">
{{ option.text }}
</option>
</select>
<span>Selected: {{ selected }}</span>
</div>
<script>
var app= new Vue({
el: "#veg",
data() {
return {
checkedNames: []
}
}
})
var app= new Vue({
el:"#beeru",
data() {
return {
selected: 'Nothing',
options: [
{ text: '2', value: 'BOOM' },
{ text: '3', value: 'BOOOM' },
{ text: '4', value: 'BOOOOM' },
{ text: '5', value: 'BOOOOOM' }
]
}
}
})
</script>
<style>
.body {
color: white;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
div.d1,div.d2{
padding-bottom:20px;
color: white;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
p{
font-size: 30px;
text-decoration: underline;
color: white;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
p1{
color: white;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
</style>
</body>
</html>