Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 11 lesson 1 answer for javascript

i am getting an error
by

2 Answers

iamabhishek
What error are you getting?
kshitijrana14
Try this one

<!doctype html>
<html>
<head>
<style>
#box {
height: 100px;
width: 100px;
border-radius: 10px;
background-color: #4535AA;
}
</style>
<title>Revise what we know!</title>
</head>
<body>
<div id="box"></div>
<br/>
<!-- set remix() as onclick handler function -->
<button id="remix" onclick = "remix()">Remix Box!</button>
<script>
function remix() {
// access div element with id box

let box = document.getElementById("box");
// change background color
box.style.backgroundColor = "#FFB643";
// show alert
alert("Color changed");
}
</script>
</body>
</html>

Login / Signup to Answer the Question.