Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강희주
/
Music_Recommendation_Website
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
강희주
2022-06-09 12:22:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d97e73fb208e6403711d27c33f5ab91d8e4795b1
d97e73fb
1 parent
b047fdfc
Update main.html
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
main_/main.html
main_/main.html
View file @
d97e73f
...
...
@@ -21,8 +21,11 @@
//request는 string으로 받아오기 때문에 JSON형태로 바꿔준다.
//var jsonObject = JSON.parse();
var
LocationName
=
jsonObject
.
name
;
//지역 이름
document
.
getElementById
(
"LocationName"
).
innerHTML
=
LocationName
;
var
WeatherCondition
=
jsonObject
.
weather
[
0
].
main
;
//현재 날씨
document
.
getElementById
(
"WeatherCondition"
).
innerHTML
=
WeatherCondition
;
var
Temp
=
jsonObject
.
main
.
temp
;
//현재 기온
document
.
getElementById
(
"Temp"
).
innerHTML
=
Temp
;
//console.log(body);
console
.
log
(
LocationName
);
console
.
log
(
WeatherCondition
);
...
...
@@ -35,6 +38,7 @@
navigator
.
geolocation
.
getCurrentPosition
(
function
(
pos
)
{
$
(
'#latitude'
).
html
(
pos
.
coords
.
latitude
);
$
(
'#longitude'
).
html
(
pos
.
coords
.
longitude
);
// useGps(); // GPS 정보를 모두받아온 뒤에 코드를 실행함
useGps
();
});
}
...
...
@@ -85,6 +89,7 @@
clock
();
setInterval
(
clock
,
1000
);
// 1초마다 실행
</script>
</fieldset>
<fieldset>
...
...
@@ -101,22 +106,9 @@
<fieldset>
<legend>
추천 음악 정보
</legend>
<div><input
type=
"button"
value=
"음악 추천 받기"
></div><br>
<!-- <iframe id="video1" width="450" height="280" src="" frameborder="0" allowtransparency="true" allowfullscreen></iframe>
<a href="#" id="playvideo">Play button</a>
<script>
var userLat = 37;
var userLng = 127;
fetch("http://localhost:3000/music")
.then(res => res.json())
.then(function(data) {
$("#playvideo").click(function(){
$("#video1")[0].src += data.link;
});
})
</script> -->
<h4>
추천 음악 1
</h4>
<div
id=
"div1"
></div>
<iframe
width=
"942"
height=
"530"
src=
"https://www.youtube.com/embed/vnS_jn2uibs"
title=
"YouTube video player"
frameborder=
"0"
allow=
"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe><br>
<h4>
추천 음악 2
</h4>
...
...
Please
register
or
login
to post a comment