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
sdy
2020-04-25 01:00:24 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a7147941de8e4784e07e0d79b84a7b4008fb4829
a7147941
2 parents
4aff1bce
6c191a17
Merge branch 'master' of
ssh://khuhub.khu.ac.kr:12959/2020-1-capstone-design1/Triz_Project1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
27 deletions
front/web/JS/validation.js
front/web/signinmain.html
front/web/style/style.css
front/web/JS/validation.js
View file @
a714794
...
...
@@ -40,28 +40,12 @@ function checkValidation(self){
}
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
;
});
function
checkPasswordMatch
()
{
var
password
=
$
(
"#fpassword"
).
val
();
var
confirmPassword
=
$
(
"#spassword"
).
val
();
if
(
password
!=
confirmPassword
)
$
(
"#message"
).
html
(
"비밀번호가 일치하지 않습니다.!"
);
else
$
(
"#message"
).
html
(
"일치."
);
}
...
...
front/web/signinmain.html
View file @
a714794
...
...
@@ -10,6 +10,39 @@
</script>
<script
src=
"https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"
>
</script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'#eValidation'
).
keyup
(
function
()
{
var
re
=
/^
(([^
<>()[
\]\\
.,;:
\s
@
\"]
+
(\.[^
<>()[
\]\\
.,;:
\s
@
\"]
+
)
*
)
|
(\"
.+
\"))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
if
(
re
.
test
(
$
(
this
).
val
()))
{
$
(
this
).
css
(
"borderColor"
,
"green"
);
}
else
{
$
(
this
).
css
(
"borderColor"
,
"red"
);
}
});
});
$
(
document
).
ready
(
function
()
{
$
(
'#fValidation, #sValidation'
).
on
(
'keyup'
,
function
()
{
if
(
$
(
'#fValidation'
).
val
()
==
$
(
'#sValidation'
).
val
())
{
$
(
'#message'
).
html
(
'일치'
).
css
(
'color'
,
'green'
);
}
else
$
(
'#message'
).
html
(
'비밀번호가 일치 하지않습니다.'
).
css
(
'color'
,
'red'
);
});
});
</script>
</head>
<body>
...
...
@@ -36,9 +69,11 @@
<input
class=
"inputset"
id=
"fValidation"
type=
"password"
name=
"password"
placeholder=
"비밀번호를 입력하세요."
><br>
<label
for=
"password"
>
비밀번호 확인:
</label><br>
<input
class=
"inputset"
id=
"sValidation"
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
><br>
<input
class=
"inputset"
id=
"sValidation"
type=
"password"
name=
"checkpassword"
placeholder=
"비밀번호를 입력하세요."
>
<br>
<span
id=
'message'
></span>
<br>
<br>
<label
for=
"name"
>
이름:
</label><br>
<input
class=
"inputset"
type=
"text"
name=
"name"
placeholder=
"이름을 입력하세요."
><br>
...
...
front/web/style/style.css
View file @
a714794
...
...
@@ -26,7 +26,11 @@
padding
:
20px
;
}
.inputset
{
margin-bottom
:
20px
;
}
.image
{
display
:
block
;
...
...
Please
register
or
login
to post a comment