-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton2.html
More file actions
59 lines (58 loc) · 1.32 KB
/
button2.html
File metadata and controls
59 lines (58 loc) · 1.32 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
1) checkbox3.html
<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;
}
input {
width: 30px;
height: 30px;
}
div#hello {
margin-top: 20px;
padding: 20px;
background-color: lightGreen;
border: 1px solid gray;
text-align: center;
font-size: 20pt;
}
</style>
</head>
<body>
<div id="app">
<h1>button</h1>
<p>{{ visible }}</p>
<hr />
<label> <button type="radio" v-on:click="show" v-show="!visible">보이기</button></label>
<label> <button type="radio" v-on:click="hide" v-show="visible">감추기</button></label>
<div id="hello" v-show="visible">Hi</div>
</div>
<script type="text/javascript">
let app = {
data() {
return { visible: false };
},
methods: {
show() {
this.visible = true;
},
hide() {
this.visible = false;
},
},
};
Vue.createApp(app).mount("#app");
</script>
</body>
</html>