Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zuzitsu
/
UR_Village
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Suyeon Jung
2020-12-10 13:32:09 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb1aae1f8cf508f068207d3ccb5f3fdc0a80ec66
cb1aae1f
1 parent
4a3ffc02
Add validate function to index
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
24 deletions
views/components/header.ejs
views/index.ejs
views/components/header.ejs
View file @
cb1aae1
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Sunflower:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css">
<title>🏡 어떤 동네가 좋은 동네일까?</title>
<style>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Sunflower:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css">
<title>🏡 어떤 동네가 좋은 동네일까?</title>
<style>
img {
display: block;
margin: 0px auto;
}
</style>
</head>
\ No newline at end of file
</style>
\ No newline at end of file
...
...
views/index.ejs
View file @
cb1aae1
<!DOCTYPE html>
<html
lang=
"ko"
>
<
%- include('components/header') -%>
<body>
<head>
<
%- include('components/header') -%>
<script>
function
validate
()
{
// 필수 입력자 확인
let
sigun
=
document
.
getElementById
(
"sigun"
).
value
;
let
dong
=
document
.
getElementById
(
"dong"
).
value
;
if
(
!
sigun
||
!
dong
)
{
alert
(
"주소를 입력해주세요(시/군, 동 필수)"
);
document
.
getElementById
(
"sigun"
).
focus
();
}
else
{
document
.
getElementById
(
"location"
).
submit
();
}
}
</script>
</head>
<body>
<div
class=
"indexpage"
>
<form
action=
"/category"
method=
"post"
name
=
"location"
>
<form
action=
"/category"
method=
"post"
name=
"location"
id
=
"location"
>
<div
class=
"card mx-auto mb-2"
style=
"width : 100%;"
>
<img
class=
"gyeonggi"
src=
"/img/logo.png"
style=
"margin :30px"
>
...
...
@@ -18,16 +35,16 @@
<h5
class=
"card-title"
>
당신이 조사하고 싶은 동네의 주소를 입력하세요!
</h5><br>
<p>
* 경기도 내 동네만을 입력해주세요
</p><br>
<input
type=
"text"
class=
"form-control"
id=
"exampleFormControlInput1
"
name=
"sigun"
placeholder=
"시/군을 입력하세요"
><br>
<input
type=
"text"
class=
"form-control"
id=
"exampleFormControlInput1
"
name=
"gu"
placeholder=
"구를 입력하세요"
><br>
<input
type=
"text"
class=
"form-control"
id=
"exampleFormControlInput1
"
name=
"dong"
placeholder=
"읍/면/동을 입력하세요"
><br>
<button
type=
"submit
"
class=
"btn btn-warning"
>
검색
</button><br>
<input
type=
"text"
class=
"form-control"
id=
"sigun
"
name=
"sigun"
placeholder=
"시/군을 입력하세요"
><br>
<input
type=
"text"
class=
"form-control"
id=
"gu
"
name=
"gu"
placeholder=
"구를 입력하세요"
><br>
<input
type=
"text"
class=
"form-control"
id=
"dong
"
name=
"dong"
placeholder=
"읍/면/동을 입력하세요"
><br>
<button
type=
"button"
onclick=
"validate()
"
class=
"btn btn-warning"
>
검색
</button><br>
</div>
</div>
</div>
</form>
</div>
</body>
</body>
...
...
Please
register
or
login
to post a comment