This repository has been archived by the owner on Feb 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DOM_nayoung.html
100 lines (91 loc) · 3.95 KB
/
DOM_nayoung.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
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="DOM_nayoung.css">
<title>toy_practice</title>
<link rel="stylesheet" type="text/css" href="Semantic-UI-CSS-master/semantic.css">
</head>
<body>
<!--
1. 체킹을 하면, 카운트된다.
1-1. checkbox.checked === true 이면 count++
2. count 카운트된 숫자를 alert에 띄운다.
2-1. count 버튼을 누르면 alert이 띄어지게한다.
-->
<div class="bg">
<div class="wrapper">
<div class="ui secondary pointing menu">
<a class="active item" href="DOM_nayoung.html">1_checkbox</a>
<a class="item" href="IMG_Carousel_nayoung.html">2_carousel</a>
<a class="item" href="fadeEffect_nayoung.html">3_fade</a>
<a class="item" href="bookList.html">4_bookList</a>
</div>
<h1 class="ui header">DOM control Practice
<div class="sub header">Vanila JS / SemanticUI / 김나영 / 20170821</div>
</h1><div class="ui divider"></div>
<section class="ui grid sec1">
<h3>Checked된 checkbox의 수를 alert으로 표시하는 버튼과 <br>모든 체크박스를 on/off 로 토글하는 버튼</h3>
<div class="eight wide column">
<div class="fields">
<div class="ui checkbox">
<input type="checkbox" name="check1" value="" class="check">
<label for="">Option1</label>
</div>
</div>
<div class="fields">
<div class="ui checkbox">
<input type="checkbox" name="check2" value="" class="check"><label for="">Option2</label>
</div>
</div>
<div class="fields">
<div class="ui checkbox">
<input type="checkbox" name="check3" value="" class="check"><label for="">Option3</label>
</div>
</div>
</div>
<div class="eight wide column">
<button class="ui purple basic button fields fluid" id="button">체크박스 갯수</button>
<button class="ui orange basic button fields fluid" id="selectAll">전체 체크하기</button>
</div>
</section>
</h1><div class="ui divider"></div>
<h3>약관 동의가 체크되지 않았을 때, alert으로 약관 동의를 요구</h3>
<div class="ui attached segment">
<div class="ui purple segment">
<div class="stipulation1">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse possimus enim modi fuga, sed natus at voluptatum eum rem repudiandae.
</p>
<div class="fields ui checkbox">
<input type="checkbox" name="check1" value="" class="agree"><label for="">약관동의</label>
</div>
</div>
</div>
<div class="ui purple segment">
<div class="stipulation2">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse possimus enim modi fuga, sed natus at voluptatum eum rem repudiandae.
</p>
<div class="fields ui checkbox">
<input type="checkbox" name="check1" value="" class="agree"><label for="">약관동의</label>
</div>
</div>
</div>
</div>
<div class="ui two bottom attached buttons">
<button class="ui purple basic button fields" id="selectAllagree">모두 동의</button>
<button class="ui orange basic button fields" id="alertBtn">확인</button>
</div>
</div>
</div>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="Semantic-UI-CSS-master/semantic.min.js"></script>
<script src = "DOM_nayoung.js"></script>
</body>
</html>