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 21:46:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f418eb5d5ec6a4d29523c093b44feb9cbebc09c7
f418eb5d
1 parent
c6877c0a
validation is working
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
front/web/signinmain.html
front/web/validation.js
front/web/signinmain.html
View file @
f418eb5
...
...
@@ -24,22 +24,22 @@
<div
id=
"article"
>
<h2>
회원가입
</h2>
<div
id=
"inputset"
>
<form
class=
"signinform"
action=
"loginmain.html"
onsubmit=
"return checkValidation()"
method=
"post"
>
<form
class=
"signinform"
action=
"loginmain.html"
onsubmit=
"return checkValidation()"
method=
"post"
>
<label
for=
"email"
>
이메일:
</label><br>
<input
id=
"eValidation"
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
required
><br>
<input
id=
"eValidation"
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
><br>
<label
for=
"password"
>
비밀번호:
</label><br>
<input
id=
"fValidation"
type=
"password"
name=
"password"
placeholder=
"비밀번호를 입력하세요."
required
><br>
<input
id=
"fValidation"
type=
"password"
name=
"password"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"password"
>
비밀번호 확인:
</label><br>
<input
id=
"sValidation"
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
required
><br>
<input
id=
"sValidation"
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"name"
>
이름:
</label><br>
<input
type=
"text"
name=
"name"
placeholder=
"이름을 입력하세요."
required
><br>
<input
type=
"text"
name=
"name"
placeholder=
"이름을 입력하세요."
><br>
<label
for=
"age"
>
나이:
</label><br>
<input
type=
"text"
name=
"age"
placeholder=
"나이를 입력하세요."
required
><br><br>
<input
type=
"text"
name=
"age"
placeholder=
"나이를 입력하세요."
><br><br>
<label
for=
"sex"
>
성별:
</label><br>
<input
type=
"radio"
value=
"man"
name=
"sex"
>
남자
<br>
...
...
@@ -57,7 +57,10 @@
<input
type=
"checkbox"
value=
"study"
name=
"interesting"
>
공부
<br>
<input
type=
"checkbox"
value=
"coding"
name=
"interesting"
>
코딩
<br><br>
<input
type=
"submit"
value=
"회원가입신청"
>
<input
type=
"submit"
value=
"회원가입신청"
>
</form>
</div>
</div>
...
...
front/web/validation.js
View file @
f418eb5
...
...
@@ -4,7 +4,7 @@ var 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
if
(
email
===
NULL
){
}
else
if
(
email
===
""
){
alert
(
"이메일을 입력해주세요!"
);
return
false
;
}
...
...
@@ -19,21 +19,20 @@ var Password={
checkPassword
:
function
(
self
){
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
if
(
fpassword
===
spassword
){
return
true
;
}
else
if
(
fpassword
===
NULL
||
spassword
===
NULL
){
if
(
fpassword
===
""
||
spassword
===
""
){
alert
(
"비밀번호를 입력해주세요!"
);
return
false
;
}
else
{
alert
(
"작성한 비밀번호들이 다릅니다!"
);
}
else
if
(
fpassword
===
spassword
){
return
true
;
}
else
{
alert
(
"입력하신 비밀번호들이 다릅니다!"
);
return
false
;
}
}
}
function
checkValidation
(
self
){
Email
.
checkmail
();
Password
.
checkPassword
();
if
(
Email
.
checkEmail
()
&&
Password
.
checkPassword
()
){
return
true
;
}
else
return
false
;
...
...
Please
register
or
login
to post a comment