-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTask35.html
34 lines (29 loc) · 847 Bytes
/
Task35.html
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
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
}
#resultCheckbox {
margin-top: 10px;
}
</style>
<title>Task 35</title>
</head>
<body>
<input type="checkbox" id="myCheckbox"> Check me
<div id="resultCheckbox"></div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const checkbox = document.getElementById('myCheckbox');
const resultCheckbox = document.getElementById('resultCheckbox');
checkbox.addEventListener('change', function () {
resultCheckbox.textContent = checkbox.checked ? 'Отмечен' : 'Не отмечен';
});
});
</script>
</body>
</html>