I am not able to perform a transition exercise. I have the img of the lamp erased and another one lit and a ragged one! Until the access I did, but when it's pa, breaking the code does not work!
Here is the source code:
<!DOCTYPE html>
<html>
<head>
<title>teste javascript </title>
<meta charset="UTF-8"/>
<script>
function acendeLampada(){
document.getElementById("Luz").src = "_imagens/Lampada-acesa.jpg ";
}
function apagaLampada() {
document.getElementById("Luz").src = " _imagens/Lampada-apagada.jpg ";
}
function quebraLampada() {
}
document.getElementById("Luz").src = "_imagens/lampada-quebrada.jpg ";
</script>
</head>
<body>
<h1> Acenda a lâmpada</h1>
<img src="_imagens/Lampada-apagada.jpg" id="Luz" onmousemove="acendeLampada()" onmouseout=" apagaLampada()" onclick="quebra-Lampada()"/>
</body>
</html>