Есть такой код:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Time</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src = "script.js"></script>
<link rel="manifest" href="manifest.json">
<div>Time</div>
</head>
<body>
<div id='clock'>
<div id="user-city"></div>
</div>
<div class="navbar">
<a href="C:\time\time.html">Time</a>
<a href="C:\stopw\stopwatch.html">Stopwatch</a>
<a href="C:\timer\timer.html">Timer</a>
</div>
</body>
<script>
window.onload = function(){
window.setInterval(
function(){
var d = new Date();
document.getElementById("clock").innerHTML = d.toLocaleTimeString();
}
, 1000);
}
</script>
<script type="text/javascript">
window.onload = function () {
jQuery("#user-city").text(ymaps.geolocation.city);
jQuery("#user-region").text(ymaps.geolocation.region);
jQuery("#user-country").text(ymaps.geolocation.country);
}
</script>
</html>
Хочу, чтобы отображалось время и город пользователя, на данный момент отображается только город. Как это можно исправить?