-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathradio1.html
More file actions
61 lines (61 loc) · 1.38 KB
/
radio1.html
File metadata and controls
61 lines (61 loc) · 1.38 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
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/vue@next"></script>
<style>
div#app {
margin: 20px auto;
padding: 20px;
width: 300px;
border: 1px solid gray;
box-shadow: 5px 5px 5px #aaa;
}
p {
font-size: 15pt;
color: blue;
}
select {
padding: 5px;
font-size: 15pt;
width: 150px;
margin: 10px;
}
label {
font-size: 14pt;
}
</style>
</head>
<body>
<div id="app">
<h1>select</h1>
<p>{{ choice }}</p>
<hr />
<select v-model="choice">
<option>yellow</option>
<option>green</option>
<option>blue</option>
<option>red</option>
</select>
<div>
<label>
<input type="radio" value="yellow" v-model="choice" />yellow
</label>
<label>
<input type="radio" value="green" v-model="choice" />green
</label>
<label>
<input type="radio" value="blue" v-model="choice" />blue
</label>
<label> <input type="radio" value="red" v-model="choice" />red </label>
</div>
</div>
<script type="text/javascript">
let app = {
data() {
return { choice: "yellow" };
},
};
Vue.createApp(app).mount("#app");
</script>
</body>
</html>