-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadimSayaci.html
More file actions
30 lines (28 loc) · 848 Bytes
/
adimSayaci.html
File metadata and controls
30 lines (28 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adım Sayacı</title>
</head>
<body>
<div id="antrenman">
<h3>Günlük Hedef: 10.000 adım</h3>
<p>Atılan adım: <span id="adim">0</span></p>
<button onclick="adimEkle(1000)">1000 adım ekle</button>
<progress id="ilerleme" value="0" max="10000"></progress>
</div>
<script>
let adimSayisi = 0;
function adimEkle(adim) {
adimSayisi += adim;
document.getElementById("adim").textContent = adimSayisi;
document.getElementById("ilerleme").value = adimSayisi;
if(adimSayisi >= 10000) {
document.body.style.background = "yellow";
alert("Tebrikler! Günlük hedefi tamamladınız!");
}
}
</script>
</body>
</html>