- Joined
- Apr 7, 2018
- Posts
- 324
- Reaction
- 75
- Points
- 219
BAKA PO MAY CODE KAYO JAN WORLD MAP PAG CLINICK MAY INFO TY PO NAKAKABALIW NA KSI HAHAHA
<!DOCTYPE html>
<html>
<head>
<title>World Map</title>
<style>
#map {
width: 800px;
height: 500px;
background-color: lightgray;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = document.getElementById("map");
map.addEventListener("click", function(event) {
var country = event.target.getAttribute("data-country");
var info = event.target.getAttribute("data-info");
if (country && info) {
alert("Country: " + country + "\nInfo: " + info);
}
});
</script>
</body>
</html>
#map {
width: 800px;
height: 500px;
background-color: lightgray;
}
width
at height
properties. Maaari mo rin i-customize ang hitsura ng mapa at impormasyon gamit ang CSS. At kung gusto mo ng iba pang mga detalye tungkol sa mga bansa, maaari mong baguhin o dagdagan ang mga attributes ng div element sa HTML code.