Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source-group1
/
animal-Info
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
오수빈
2021-05-29 16:01:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85868125b8b33bea1ac46ac45524c9295f0f8793
85868125
1 parent
95b0247e
get location from index
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
app.js
routes/category.js
views/index.ejs
app.js
View file @
8586812
...
...
@@ -6,6 +6,7 @@ var logger = require('morgan');
var
indexRouter
=
require
(
'./routes/index'
);
var
usersRouter
=
require
(
'./routes/users'
);
//var categoryRouter = require('./routes/category');
var
categoryRouter
=
require
(
'./routes/category'
);
var
app
=
express
();
...
...
routes/category.js
View file @
8586812
...
...
@@ -43,5 +43,12 @@ router.get('/hospital', function (req, res) {
res
.
send
(
"finish"
);
})
});
router
.
post
(
'/'
,
function
(
req
,
res
){
//console.log("hello it's category");
var
body
=
req
.
body
;
var
gu_select
=
body
.
user_gu
;
console
.
log
(
gu_select
);
});
module
.
exports
=
router
;
\ No newline at end of file
...
...
views/index.ejs
View file @
8586812
...
...
@@ -65,6 +65,14 @@
font-size
:
xx-large
;
}
</style>
<script>
function
sm
()
{
document
.
getElementById
(
"location"
).
submit
();
}
</script>
</head>
<body>
...
...
@@ -83,9 +91,13 @@
<p>
지역 선택
</p>
<select>
<option
value=
'금천구'
>
금천구
</option>
</select>
<form
action=
"/category"
method=
"post"
name=
"location"
id=
"location"
>
<select
onchange=
"sm()"
name=
"user_gu"
id=
"user_gu_select"
>
<option
value=
""
>
--Please choose an option--
</option>
<option
value=
'금천구'
>
금천구
</option>
<option
value=
'강남구'
>
강남구
</option>
</select>
</form>
</div>
</div>
...
...
Please
register
or
login
to post a comment