Merge branch 'master' of ssh://khuhub.khu.ac.kr:12959/2020-1-capstone-design1/Triz_Project1
Showing
7 changed files
with
99 additions
and
6 deletions
1 | + | ||
1 | var Email={ | 2 | var Email={ |
2 | checkEmail:function(self){ | 3 | checkEmail:function(self){ |
3 | var email=document.getElementById('eValidation').value; | 4 | var email=document.getElementById('eValidation').value; |
... | @@ -5,6 +6,7 @@ var Email={ | ... | @@ -5,6 +6,7 @@ var Email={ |
5 | if(regExp.test(email)){ | 6 | if(regExp.test(email)){ |
6 | return true; | 7 | return true; |
7 | }else if(email===""){ | 8 | }else if(email===""){ |
9 | + focusFunction("#eValidation"); | ||
8 | alert("이메일을 입력해주세요!"); | 10 | alert("이메일을 입력해주세요!"); |
9 | return false; | 11 | return false; |
10 | } | 12 | } |
... | @@ -37,3 +39,29 @@ function checkValidation(self){ | ... | @@ -37,3 +39,29 @@ function checkValidation(self){ |
37 | }else return false; | 39 | }else return false; |
38 | 40 | ||
39 | } | 41 | } |
42 | + | ||
43 | +function focusFunction(id) { | ||
44 | +document.getElementById(id).focus(); | ||
45 | +} | ||
46 | + | ||
47 | +function blurFunction(id) { | ||
48 | + document.getElementById(id).style.borderColor="2px solid"; | ||
49 | + document.getElementById(id).style.borderColor="red"; | ||
50 | +} | ||
51 | + | ||
52 | +function validate(self){ | ||
53 | + var email=document.getElementById('eValidation').value; | ||
54 | + var regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i; | ||
55 | + var fpassword=document.getElementById('fValidation').value; | ||
56 | + var spassword= document.getElementById('sValidation').value; | ||
57 | + var x = document.getElementById(".inputset"); | ||
58 | + $(document).ready(function(){ | ||
59 | + if(regExp.test(email)){ | ||
60 | + return true; | ||
61 | + }else if(email=""){ | ||
62 | + | ||
63 | + return false; | ||
64 | + }else return true; | ||
65 | + | ||
66 | + }); | ||
67 | +} | ... | ... |
front/web/ex/fetch.html
0 → 100644
front/web/ex/fetch2.html
0 → 100644
1 | +<!doctype html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <title>WEB1 - Welcome</title> | ||
5 | + <meta charset="utf-8"> | ||
6 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
7 | + <script src="colors.js"></script> | ||
8 | + <script src="../fetch-master/fetch.js"></script> | ||
9 | +</head> | ||
10 | +<body> | ||
11 | + <h1><a href="#!welcome">WEB</a></h1> | ||
12 | + <h1><a href="index.html">WEB</a></h1> | ||
13 | + <h2><a href="welcome.html">Welcome</h2> | ||
14 | + <input id="night_day" type="button" value="night" onclick=" | ||
15 | + nightDayHandler(this); | ||
16 | + "> | ||
17 | + <ol id="nav"> | ||
18 | + | ||
19 | + </ol> | ||
20 | + <article> | ||
21 | + </article> | ||
22 | + <script> | ||
23 | + function fetchPage(name){ | ||
24 | + fetch(name).then(function(response){ | ||
25 | + response.text().then(function(text){ | ||
26 | + document.querySelector('article').innerHTML=text; | ||
27 | + }) | ||
28 | + }); | ||
29 | + } | ||
30 | + | ||
31 | + if(location.hash){ | ||
32 | + fetchPage(location.hash.substr(2)); | ||
33 | + }else{ | ||
34 | + fetchPage('welcome'); | ||
35 | + } | ||
36 | + fetch('list').then(function(response){ | ||
37 | + response.text().then(function(text){ | ||
38 | + document.querySelector('#nav').innerHTML=text; | ||
39 | + }) | ||
40 | + }); | ||
41 | + | ||
42 | + </script> | ||
43 | +</body> | ||
44 | +</html> |
front/web/ex/test
deleted
100644 → 0
File mode changed
front/web/ex/캡디 계획표.pptx
deleted
100644 → 0
No preview for this file type
... | @@ -21,6 +21,9 @@ | ... | @@ -21,6 +21,9 @@ |
21 | <li><a href="afterlogin.html" class="saw">로그인이후</a></li> | 21 | <li><a href="afterlogin.html" class="saw">로그인이후</a></li> |
22 | </ol> | 22 | </ol> |
23 | </div> | 23 | </div> |
24 | + <article> | ||
25 | + | ||
26 | + </article> | ||
24 | <div id="article"> | 27 | <div id="article"> |
25 | <h2><a href=https://www.helpshift.com/glossary/chat-service/ | 28 | <h2><a href=https://www.helpshift.com/glossary/chat-service/ |
26 | title="what is chat service">chat service란 무엇인가?</a></h2> | 29 | title="what is chat service">chat service란 무엇인가?</a></h2> | ... | ... |
... | @@ -5,7 +5,11 @@ | ... | @@ -5,7 +5,11 @@ |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <link rel="stylesheet" href="style/style.css"> | 6 | <link rel="stylesheet" href="style/style.css"> |
7 | <script src="JS/validation.js"></script> | 7 | <script src="JS/validation.js"></script> |
8 | - | 8 | +<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> |
9 | +<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.js"> | ||
10 | +</script> | ||
11 | +<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"> | ||
12 | +</script> | ||
9 | </head> | 13 | </head> |
10 | <body> | 14 | <body> |
11 | 15 | ||
... | @@ -26,20 +30,20 @@ | ... | @@ -26,20 +30,20 @@ |
26 | <div id="inputset"> | 30 | <div id="inputset"> |
27 | <form class="signinform" action="loginmain.html" onsubmit="return checkValidation()" method="post"> | 31 | <form class="signinform" action="loginmain.html" onsubmit="return checkValidation()" method="post"> |
28 | <label for="email">이메일:</label><br> | 32 | <label for="email">이메일:</label><br> |
29 | - <input id="eValidation"type="text" name="email" placeholder="이메일을 입력하세요." ><br> | 33 | + <input class="inputset" id="eValidation"type="text" name="email" placeholder="이메일을 입력하세요." ><br> |
30 | 34 | ||
31 | <label for="password">비밀번호:</label><br> | 35 | <label for="password">비밀번호:</label><br> |
32 | - <input id="fValidation" type="password" name="password" placeholder="비밀번호를 입력하세요." ><br> | 36 | + <input class="inputset" id="fValidation" type="password" name="password" placeholder="비밀번호를 입력하세요." ><br> |
33 | 37 | ||
34 | <label for="password">비밀번호 확인:</label><br> | 38 | <label for="password">비밀번호 확인:</label><br> |
35 | - <input id="sValidation" type="password" name="checkpassword" placeholder="비밀번호를 입력하세요." ><br> | 39 | + <input class="inputset" id="sValidation" type="password" name="checkpassword" placeholder="비밀번호를 입력하세요." ><br> |
36 | 40 | ||
37 | 41 | ||
38 | <label for="name">이름:</label><br> | 42 | <label for="name">이름:</label><br> |
39 | - <input type="text" name="name"placeholder="이름을 입력하세요." ><br> | 43 | + <input class="inputset"type="text" name="name" placeholder="이름을 입력하세요." ><br> |
40 | 44 | ||
41 | <label for="age">나이:</label><br> | 45 | <label for="age">나이:</label><br> |
42 | - <input type="text" name="age" placeholder="나이를 입력하세요." ><br><br> | 46 | + <input class="inputset"type="text" name="age" placeholder="나이를 입력하세요." ><br><br> |
43 | 47 | ||
44 | <label for="sex">성별:</label><br> | 48 | <label for="sex">성별:</label><br> |
45 | <input type="radio" value="man" name="sex">남자<br> | 49 | <input type="radio" value="man" name="sex">남자<br> | ... | ... |
-
Please register or login to post a comment