Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
MinsoftK
2020-04-23 19:20:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b4e0ee1f403b6733420e015dca2420fa867fa496
b4e0ee1f
1 parent
8bc7f247
create about login validation(Email From and Password )
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
5 deletions
front/web/signinmain.html
front/web/validation.js
front/web/signinmain.html
View file @
b4e0ee1
...
...
@@ -4,7 +4,7 @@
<title>
KHU KHU Chat
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<script
src=
"validation.js"
></script>
</head>
<body>
...
...
@@ -26,13 +26,13 @@
<div
id=
"inputset"
>
<form
class=
"signinform"
action=
"loginmain.html"
>
<label
for=
"email"
>
이메일:
</label><br>
<input
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
><br>
<input
id=
"eValidation"
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
><br>
<label
for=
"password"
>
비밀번호:
</label><br>
<input
type=
"password"
name=
"password"
placeholder=
"비밀번호를 입력하세요."
><br>
<input
id=
"fValidation"
type=
"password"
name=
"password"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"password"
>
비밀번호 확인:
</label><br>
<input
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
><br>
<input
id=
"sValidation"
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"name"
>
이름:
</label><br>
...
...
front/web/validation.js
View file @
b4e0ee1
function
var
Email
=
{
checkEmailForm
:
function
(
email
){
var
regExp
=
/^
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*@
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*.
[
a-zA-Z
]{2,3}
$/i
;
if
(
regExp
.
test
(
email
){
return
true
;
}
else
return
false
;
}
,
checkEmpty
:
function
(
self
){
var
putEmail
=
document
.
getElementById
(
'eValidation'
).
value
;
if
(
Email
.
checkEmailForm
(
putEmail
)
===
true
){
return
true
;
}
else
{
if
(
Email
.
checkEmailForm
(
putEmail
)
===
NULL
)
alert
(
"Email을 입력하세요."
);
else
alert
(
"Email 형식을 확인해주세요."
);
}
}
}
var
Password
=
{
checkPasswordfs
:
function
(
self
){
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
if
(
fpassword
===
spassword
){
return
true
;
}
else
return
false
;
}
,
checkEmpty
:
function
(
self
){
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
if
(
fpassword
===
NULL
||
spassword
===
NULL
){
alert
(
"비밀번호를 입력해주세요"
);
}
else
{
return
true
;
}
}
,
}
function
validationCheck
(
self
)
{
if
(
Password
.
checkPasswordfs
()){
Password
.
checkEmpty
();
}
else
alert
(
"두 비밀번호가 일치하지 않습니다! 다시 입력해주세요!"
);
}
function
nightDayHandler
(
self
){
if
(
self
.
value
===
'night'
)
{
Body
.
SetBackGruondColor
(
'black'
)
Body
.
SetColor
(
'white'
);
self
.
value
=
'day'
;
Links
.
SetColor
(
'powderblue'
);
}
else
{
Body
.
SetBackGruondColor
(
'white'
)
Body
.
SetColor
(
'black'
);
self
.
value
=
'night'
;
Links
.
SetColor
(
'blue'
);
}
}
...
...
Please
register
or
login
to post a comment