<!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>Document</title>
</head>
<body>
<img src="Имга1" alt="" class="img1" width="100" height="100">
</body>
<script>
let img = document.querySelector('.img1')
img.addEventListener('mouseover', function(){
if(img.getAttribute('src') === "Имга1"){
img.setAttribute('src', 'Имга2')
}
else{
img.setAttribute('src', 'Имга1')
}
})
img.addEventListener('mouseout', function(){
if(img.getAttribute('src') === "Имга1"){
img.setAttribute('src', 'Имга2')
}
else{
img.setAttribute('src', 'Имга1')
}
})
</script>
</html>
<!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>Document</title>
</head>
<body>
<p class="p"></p>
</body>
<script>
let p = document.querySelector('.p')
let date = new Date
setInterval(() => {
if(date.getHours() == 8 && date.getMinutes() == 40){
p.textContent = "Урок окончен"
}
}, 0);
setInterval(() => {
if(date.getHours() == 8 && date.getMinutes() == 0){
p.textContent = "Урок начат"
}
}, 0);
</script>
</html>