Showing
3 changed files
with
21 additions
and
1 deletions
... | @@ -6,6 +6,7 @@ var logger = require('morgan'); | ... | @@ -6,6 +6,7 @@ var logger = require('morgan'); |
6 | 6 | ||
7 | var indexRouter = require('./routes/index'); | 7 | var indexRouter = require('./routes/index'); |
8 | var usersRouter = require('./routes/users'); | 8 | var usersRouter = require('./routes/users'); |
9 | +//var categoryRouter = require('./routes/category'); | ||
9 | var categoryRouter = require('./routes/category'); | 10 | var categoryRouter = require('./routes/category'); |
10 | 11 | ||
11 | var app = express(); | 12 | var app = express(); | ... | ... |
... | @@ -44,4 +44,11 @@ router.get('/hospital', function (req, res) { | ... | @@ -44,4 +44,11 @@ router.get('/hospital', function (req, res) { |
44 | }) | 44 | }) |
45 | }); | 45 | }); |
46 | 46 | ||
47 | +router.post('/', function(req, res){ | ||
48 | + //console.log("hello it's category"); | ||
49 | + var body = req.body; | ||
50 | + var gu_select = body.user_gu; | ||
51 | + console.log(gu_select); | ||
52 | + }); | ||
53 | + | ||
47 | module.exports = router; | 54 | module.exports = router; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -65,6 +65,14 @@ | ... | @@ -65,6 +65,14 @@ |
65 | font-size: xx-large; | 65 | font-size: xx-large; |
66 | } | 66 | } |
67 | </style> | 67 | </style> |
68 | + | ||
69 | + <script> | ||
70 | + function sm() { | ||
71 | + document.getElementById("location").submit(); | ||
72 | + } | ||
73 | + </script> | ||
74 | + | ||
75 | + | ||
68 | </head> | 76 | </head> |
69 | 77 | ||
70 | <body> | 78 | <body> |
... | @@ -83,9 +91,13 @@ | ... | @@ -83,9 +91,13 @@ |
83 | <p> | 91 | <p> |
84 | 지역 선택 | 92 | 지역 선택 |
85 | </p> | 93 | </p> |
86 | - <select> | 94 | + <form action="/category" method="post" name="location" id="location"> |
95 | + <select onchange="sm()" name="user_gu" id="user_gu_select"> | ||
96 | + <option value="">--Please choose an option--</option> | ||
87 | <option value='금천구'>금천구</option> | 97 | <option value='금천구'>금천구</option> |
98 | + <option value='강남구'>강남구</option> | ||
88 | </select> | 99 | </select> |
100 | + </form> | ||
89 | </div> | 101 | </div> |
90 | </div> | 102 | </div> |
91 | 103 | ... | ... |
-
Please register or login to post a comment