sdy
1 +<!doctype html>
2 +<html>
3 +<head>
4 +<title>KHU KHU Chat</title>
5 +<meta charset="utf-8">
6 +
7 +<link rel="stylesheet" href="style.css">
8 +<script>
9 +function LinksSetColor(color){
10 + var alist=document.querySelectorAll('a');
11 + var i =0;
12 + while(i<alist.length)
13 + {
14 + alist[i].style.color=color;
15 + i+=1;
16 + }
17 +}
18 +var Body={
19 + setColor:function(color){
20 +
21 + }
22 +}
23 +function bodySetColor(color){
24 + document.querySelector('body').style.color= color;
25 +}
26 +function bodySetBackGruondColor(color){
27 + document.querySelector('body').style.backgroundColor= color;
28 +}
29 +function nightDayHandler(self){
30 + if(self.value==='night')
31 + {
32 + bodySetBackGruondColor('black')
33 + bodySetColor('white');
34 + self.value= 'day';
35 +
36 + setColor('powderblue');
37 +
38 + }else{
39 + bodySetBackGruondColor('white')
40 + bodySetColor('black');
41 + self.value= 'night';
42 +
43 + setColor('blue');
44 + }
45 + }
46 +</script>
47 +</head>
48 +<body>
49 +
50 + <h1><a href="main.html" color:black>KHU Chatting service</a></h1>
51 + <img src="image/signin.jpg" class="image">
52 +
53 +<!--refactoring and conditional statement -->
54 +
55 +
56 +<!-- about this grammer
57 +
58 + <input type="button" value="night" onclick="
59 + if(this.value==='night')
60 + {
61 + document.querySelector('body').style.backgroundColor= 'black';
62 + document.querySelector('body').style.color= 'white';
63 + this.value= 'day';
64 + }else{
65 + document.querySelector('body').style.backgroundColor= 'white';
66 + document.querySelector('body').style.color= 'black';
67 + this.value= 'night';
68 + }
69 + ">
70 + -->
71 +
72 +
73 +
74 +<!-- about array
75 + <script>
76 + var cowokers=["minsing","minsoft"];
77 + document.write(cowokers[0]);
78 + document.write(cowokers[1]);
79 + cowokers.push("ssssss")
80 + document.write(cowokers);
81 + </script>
82 +-->
83 +
84 +<!-- about Loop
85 +<ul>
86 + <script>
87 + var i=0;
88 + while(i<3)
89 + {
90 + document.write("<li>var</li>")
91 + i+=1;
92 + }
93 + </script>
94 +</ul>
95 +-->
96 +
97 +
98 +
99 +<!--Loop & Array
100 +<script>
101 + var cowokers=["minsung","leezche","minsoft","sdy"];
102 +</script>
103 +
104 +<script>
105 + var i=0;
106 + while( i< cowokers.length ){
107 + document.write('<li><a href="http://a.com/'+cowokers[i]+'">'+cowokers[i]+'</a></li>');
108 + i+=1;
109 + }
110 +</script>
111 +-->
112 +
113 +<!-- Loop apply
114 +var alist=document.querySelectorAll('a');
115 +var i =0;
116 +while(i<alist.length){
117 +console.log(alist[i]);
118 +i+=1;
119 +}
120 +-->
121 +
122 +<!-- button 1 usage array and Loop for chage style
123 + self를 통한 input의 객체 지정해주기
124 + 지정해주기전에는 전역객체를 가르키게 된다.
125 + -->
126 +<input id="night_day" type="button" value="night" onclick="
127 + nightDayHandler(this);
128 +">
129 +
130 +<!-- button2 making and using function -->
131 + <input id="night_day" type="button" value="night" onclick="
132 + nightDayHandler(this);
133 + ">
134 +
135 + <div id="grid">
136 + <ol>
137 + <li><a href="whatiskhuchat.html" class="saw">What is KHU chat? </a></li>
138 + <li><a href="loginmain.html" class="saw">로그인</a></li>
139 + <li><a href="signinmain.html" class="saw">회원가입</a></li>
140 + <li><a href="question.html" class="saw">문의사항</a></li>
141 + <li><a href="afterlogin.html" class="saw">로그인이후</a></li>
142 + </ol>
143 + <div id="article">
144 + <h2>회원가입</h2>
145 + <div id="inputset">
146 + <form class="signinform" action="loginmain.html">
147 + <label for="email">Email:</label><br>
148 + <input type="text" name="email"><br>
149 +
150 + <label for="password">password:</label><br>
151 + <input type="password" name="password"><br>
152 +
153 + <label for="name">이름:</label><br>
154 + <input type="text" name="name"><br>
155 +
156 + <label for="age">나이:</label><br>
157 + <input type="text" name="age"><br><br>
158 +
159 + <label for="sex">성별:</label><br>
160 + <input type="radio" value="man" name="sex">남자<br>
161 + <input type="radio" value="woman" name="sex">여자<br><br>
162 +
163 + <label for="work">직업:</label><br>
164 + <input type="radio" value="nowork" name="work">무직<br>
165 + <input type="radio" value="Hstudent" name="work">중/고생<br>
166 + <input type="radio" value="Ustudent" name="work">대학생<br>
167 + <input type="radio" value="worker" name="work">직장인<br><br>
168 +
169 + <label for="interesting">관심사(중복선택가능):</label><br>
170 + <input type="checkbox" value="movie" name="interesting">영화<br>
171 + <input type="checkbox" value="song" name="interesting">노래<br>
172 + <input type="checkbox" value="study" name="interesting">공부<br>
173 + <input type="checkbox" value="coding" name="interesting">코딩<br><br>
174 +
175 + <input type="submit" value="회원가입신청">
176 + </form>
177 + </div>
178 +
179 +
180 + </div>
181 + </div>
182 +
183 +
184 +</body>
185 +</html>
1 +var Links={
2 + SetColor:function(color){
3 + // var alist=document.querySelectorAll('a');
4 + // var i =0;
5 + // while(i<alist.length)
6 + // {
7 + // alist[i].style.color=color;
8 + // i+=1;
9 + // }
10 + // }
11 + $('a').css('color',color); //jquery 사용한 것.
12 + }
13 +}
14 +var Body = {
15 + SetColor:function(color){
16 + //document.querySelector('body').style.color= color;
17 + $('body').css('color',color);
18 +
19 + },
20 + SetBackGruondColor:function(color){
21 + //document.querySelector('body').style.backgroundColor= color;
22 + $('body').css('backgroundColor',color);
23 + }
24 +}
25 +
26 +function nightDayHandler(self){
27 + if(self.value==='night')
28 + {
29 + Body.SetBackGruondColor('black')
30 + Body.SetColor('white');
31 + self.value= 'day';
32 +
33 + Links.SetColor('powderblue');
34 +
35 + }else{
36 + Body.SetBackGruondColor('white')
37 + Body.SetColor('black');
38 + self.value= 'night';
39 +
40 + Links.SetColor('blue');
41 + }
42 + }
1 +<!DOCTYPE html>
2 +<html>
3 + <head>
4 + <meta charset="utf-8">
5 + <title></title>
6 + </head>
7 + <body>
8 + <h1>how to make object</h1>
9 + <script>
10 + var coworkers = {
11 + "designer":"minsung",
12 + "programmer":"sdy"
13 + };
14 + document.write("programmer: "+coworkers.programmer+"<br>");
15 + document.write("designer: "+coworkers.designer+"<br>");
16 + coworkers.bookkeeper="duru";
17 + document.write("bookkeeper: "+coworkers.bookkeeper+"<br>");
18 + coworkers["data scientist"] ="taeho";
19 + document.write("data scientist: "+coworkers["data scientist"]+"<br>");
20 + </script>
21 +
22 + <h2>iterate</h2>
23 +
24 + <h2>property & method</h2>
25 + <script>
26 + coworker.showAll =function(){
27 + for(var key in this){
28 + document.write(key+' : ' +this[key]+'<br>');
29 + }
30 + }
31 + coworkers.showAll();
32 + </script>
33 + </body>
34 +</html>
1 +<!doctype html>
2 +<html>
3 +<head>
4 +<title>KHU KHU Chat</title>
5 +<meta charset="utf-8">
6 +<link rel="stylesheet" href="style.css">
7 +<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
8 +//color.js 앞에 jquery 써줘야함
9 +</script>
10 +
11 +<script src="colors.js"></script>
12 +</head>
13 +<body>
14 + <input id="night_day" type="button" value="night" onclick="
15 + nightDayHandler(this);
16 + ">
17 + <!-- button2 making and using function -->
18 + <input id="night_day" type="button" value="night" onclick="
19 + nightDayHandler(this);
20 + ">
21 +
22 + <div id="grid">
23 + <ol>
24 + <li><a href="whatiskhuchat.html" class="saw">What is KHU chat? </a></li>
25 + <li><a href="loginmain.html" class="saw">로그인</a></li>
26 + <li><a href="signinmain.html" class="saw">회원가입</a></li>
27 + <li><a href="question.html" class="saw">문의사항</a></li>
28 + <li><a href="afterlogin.html" class="saw">로그인이후</a></li>
29 + </ol>
30 + <div id="article">
31 + <h2>회원가입</h2>
32 + <div id="inputset">
33 + <form class="signinform" action="loginmain.html">
34 + <label for="email">Email:</label><br>
35 + <input type="text" name="email"><br>
36 +
37 + <label for="password">password:</label><br>
38 + <input type="password" name="password"><br>
39 +
40 + <label for="name">이름:</label><br>
41 + <input type="text" name="name"><br>
42 +
43 + <label for="age">나이:</label><br>
44 + <input type="text" name="age"><br><br>
45 +
46 + <label for="sex">성별:</label><br>
47 + <input type="radio" value="man" name="sex">남자<br>
48 + <input type="radio" value="woman" name="sex">여자<br><br>
49 +
50 + <label for="work">직업:</label><br>
51 + <input type="radio" value="nowork" name="work">무직<br>
52 + <input type="radio" value="Hstudent" name="work">중/고생<br>
53 + <input type="radio" value="Ustudent" name="work">대학생<br>
54 + <input type="radio" value="worker" name="work">직장인<br><br>
55 +
56 + <label for="interesting">관심사(중복선택가능):</label><br>
57 + <input type="checkbox" value="movie" name="interesting">영화<br>
58 + <input type="checkbox" value="song" name="interesting">노래<br>
59 + <input type="checkbox" value="study" name="interesting">공부<br>
60 + <input type="checkbox" value="coding" name="interesting">코딩<br><br>
61 +
62 + <input type="submit" value="회원가입신청">
63 + </form>
64 + </div>
65 +
66 +
67 + </div>
68 + </div>
69 +
70 +
71 + </body>
72 + </html>
1 +# Capstone design
2 +
3 +test