Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공태현
/
healthcare-with-webcam
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
공태현
2022-05-30 15:01:29 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
cde4b9b7db13305d76e90ea2458d85678252c328
cde4b9b7
2 parents
a97cd89a
2de8ffb9
Merge branch 'feature/movePage' into feature/poseCount
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
server.js
views/mainPage/main.html
views/mainPage/main.js
server.js
View file @
cde4b9b
...
...
@@ -15,6 +15,12 @@ app.get('/', (req,res) => {
res
.
render
(
'main.html'
)
})
// js 파일 전송.
app
.
get
(
'/main.js'
,
(
req
,
res
)
=>
{
res
.
sendFile
(
__dirname
+
'/views/mainPage/main.js'
)
})
app
.
get
(
'/squart'
,
(
req
,
res
)
=>
{
app
.
set
(
'views'
,
__dirname
+
'/views/squartPage'
)
res
.
render
(
'squart.html'
)
...
...
views/mainPage/main.html
View file @
cde4b9b
...
...
@@ -8,5 +8,10 @@
</head>
<body>
Main Page
<div>
<input
type=
"button"
value =
"squart start"
id =
"moveSquart"
onclick=
"moveSquartPage()"
/>
</div>
<script
type=
"text/javascript"
src=
"./main.js"
></script>
</body>
</html>
\ No newline at end of file
...
...
views/mainPage/main.js
0 → 100644
View file @
cde4b9b
function
moveSquartPage
()
{
location
.
href
=
"/squart"
;
}
const
movePage
=
document
.
getElementById
(
"moveSquart"
)
movePage
.
addEventListener
(
'click'
,
moveSquartPage
);
\ No newline at end of file
Please
register
or
login
to post a comment