Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
azVaxz
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id='Hello' class='world' onclick="hello()">
Hello world!!!
</div>
</body>
</html>
function hello () {
var element = document.getElementById("Hello");
element.innerHTML = "Hi!!!Lol!!!";
element.style.backgroundColor = "yellow";
}
div {
height: 100px;
}
#Hello {
width: 100px;
}
.world {
background-color: orange
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment