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
minsung
2020-04-24 16:23:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c63414e551e2058968e54d6499be8fbebbd4fbab
c63414e5
1 parent
1cefc498
focus on, onblur
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
front/web/JS/validation.js
front/web/signinmain.html
front/web/JS/validation.js
View file @
c63414e
var
Email
=
{
checkEmail
:
function
(
self
){
checkEmail
:
function
(
id
){
var
email
=
document
.
getElementById
(
'eValidation'
).
value
;
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
)){
...
...
@@ -38,13 +39,29 @@ function checkValidation(self){
}
function
ajaxvalidation
(
self
){
$
(
document
).
ready
(
function
(){
var
email
=
document
.
querySelector
(
'#evalidation'
);
var
fpassword
=
document
.
querySelector
(
'#evalidation'
);
function
focusFunction
(
id
)
{
document
.
getElementById
(
id
).
focus
();
}
})
function
blurFunction
(
id
)
{
document
.
getElementById
(
id
).
style
.
borderColor
=
"2px solid"
;
document
.
getElementById
(
id
).
style
.
borderColor
=
"red"
;
}
function
validate
(
self
){
var
email
=
document
.
getElementById
(
'eValidation'
).
value
;
var
regExp
=
/^
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*@
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*.
[
a-zA-Z
]{2,3}
$/i
;
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
var
x
=
document
.
getElementById
(
".inputset"
);
$
(
document
).
ready
(
function
(){
if
(
regExp
.
test
(
email
)){
return
true
;
}
else
if
(
email
=
""
){
return
false
;
}
else
return
true
;
});
}
*
/
...
...
front/web/signinmain.html
View file @
c63414e
...
...
@@ -27,20 +27,20 @@
<div
id=
"inputset"
>
<form
class=
"signinform"
action=
"loginmain.html"
onsubmit=
"return checkValidation()"
method=
"post"
>
<label
for=
"email"
>
이메일:
</label><br>
<input
id=
"eValidation"
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
><br>
<input
class=
"inputset"
id=
"eValidation"
type=
"text"
name=
"email"
onblur=
"validateinput()"
placeholder=
"이메일을 입력하세요."
><br>
<label
for=
"password"
>
비밀번호:
</label><br>
<input
id=
"fValidation"
type=
"password"
name=
"password
"
placeholder=
"비밀번호를 입력하세요."
><br>
<input
class=
"inputset"
id=
"fValidation"
type=
"password"
name=
"password"
onblur=
"
"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"password"
>
비밀번호 확인:
</label><br>
<input
id=
"sValidation"
type=
"password"
name=
"checkpassword
"
placeholder=
"비밀번호를 입력하세요."
><br>
<input
class=
"inputset"
id=
"sValidation"
type=
"password"
name=
"checkpassword"
onblur=
"
"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"name"
>
이름:
</label><br>
<input
type=
"text"
name=
"name"
placeholder=
"이름을 입력하세요."
><br>
<input
class=
"inputset"
type=
"text"
name=
"name"
onblur=
""
placeholder=
"이름을 입력하세요."
><br>
<label
for=
"age"
>
나이:
</label><br>
<input
type=
"text"
name=
"age
"
placeholder=
"나이를 입력하세요."
><br><br>
<input
class=
"inputset"
type=
"text"
name=
"age"
onblur=
"
"
placeholder=
"나이를 입력하세요."
><br><br>
<label
for=
"sex"
>
성별:
</label><br>
<input
type=
"radio"
value=
"man"
name=
"sex"
>
남자
<br>
...
...
Please
register
or
login
to post a comment