1
I’m not managing to perform a transition exercise. I have the img One lamp’s out and one’s lit and one’s broken! Until accesses I could, but when it is pa, to break the code does not work!
Here is 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> 
						
Where is the onclick event?
– Sam
I’m still learning how to ask the questions.
– Wellington Samuel
Quiet. It’s a bit complicated even rs.
– Sam
Welcome Wellington Samuel, if any answer solved your problem mark it as accepted, see how and why in https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252