scrimba
JS 23 - Events Exercise
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

JS 23 - Events Exercise
AboutCommentsNotes
JS 23 - Events Exercise
Expand for more info
index.html
run
preview
console


<html>

<head>
<link rel="stylesheet" href="index.css">
</head>


<body>
Event Description
onchange An HTML element has been changed
onclick The user clicks an HTML element
onmouseover The user moves the mouse over an HTML element
onmouseout The user moves the mouse away from an HTML element
onkeydown The user pushes a keyboard key
onload The browser has finished loading the page

1. The <button> element should do something when someone clicks on it. Try to fix it!
<button ="alert('Hello')">Click me.</button>

2. When the button is clicked, the function "myFunction" should be executed.

<button =" ">Click me.</button>

3. The <div> element should turn red when someone moves the mouse over it.
<div ="this.style.backgroundColor='red'">myDIV.</div>

<script src="index.pack.js"></script>
</body>

</html>

Console
index.html
-3:29