<!DOCTYPE html> <head> <title>Traffic Light Sequence</title>
</head>
<body>
<script>
function Light(){
if (document.getElementById("Img").src ="Stop-Amber.png"){ then
document.getElementById("Img").src = "Stop.png" }
else if (document.getElementById("Img").src ="Go.png"){ then
document.getElementById("Img").src = "Stop-Amber.png" }
else if(document.getElementById("Img").src ="Amber.png"){ then
document.getElementById("Img").src = "Go.png" }
else if (document.getElementById("Img").src ="Stop.png") { then
document.getElementById("Img").src = "Amber.png"}}
</script>
<button type="button" onclick="Light()"> Change Image!</button> <img src="stop.png" name="Img" width="224" height="395" id="Img" style= "width:304px;height:500px; <onclick="light()">
</body>
</html>