Practice listening for and handling JavaScript DOM Events
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Stoplight Exercise</title>
|
|
|
|
<script defer src="index.js"></script>
|
|
|
|
<link rel="stylesheet" href="index.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="controls">
|
|
|
|
<div id="stopButton" class="button">Stop</div>
|
|
|
|
<div id="slowButton" class="button">Slow</div>
|
|
|
|
<div id="goButton" class="button">Go</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="traffic-light">
|
|
|
|
<div id="stopLight" class="bulb"></div>
|
|
|
|
<div id="slowLight" class="bulb"></div>
|
|
|
|
<div id="goLight" class="bulb"></div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|