-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathempty1.html
More file actions
68 lines (68 loc) · 1.99 KB
/
empty1.html
File metadata and controls
68 lines (68 loc) · 1.99 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
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/vue@next"></script>
<style>
div#app {
padding: 30px;
margin: 30px auto;
width: 350px;
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #aaa;
}
div#app > div {
margin-top: 30px;
}
label:nth-child(1) {
display: inline-block;
width: 70px;
text-align: right;
margin-right: 5px;
}
label:nth-child(2) {
margin-right: 20px;
}
input[type=text] {
padding: 6px;
width: 200px;
}
div.error {
margin-top: 5px;
margin-left: 70px;
color: red;
}
</style>
</head>
<body>
<div id="app">
<div>
<label>이메일:</label>
<input type="text" v-model="email" />
<div class="error" v-show="email == false">제목은 필수 항목입니다.</div>
</div>
<div>
<label>전화번호:</label>
<input type="text" v-model="phone" />
<div class="error" v-show="phone == false">전화번호는 필수 항목입니다.</div>
</div>
<div>
<label>성별:</label>
<label>
<input type="radio" v-model="sex" value="남" />남자</label>
<label><input type="radio" v-model="sex" value="여" />여자</label>
<div class="error" v-show="sex == false">성별은 필수 항목입니다.</div>
</div>
<script type="text/javascript">
let app = {
data() {
return {
email: '',
phone: '',
sex: ''
};
},
};
Vue.createApp(app).mount("#app");
</script>
</body>
</html>