I can't get this document.getbyelementid to work

it’s supposed to make the red circle disappear when clicked, but it doesn’t
checked in a few browsers, what could be the problem?



<style type="text/css">

.circle {

width: 120px; 
height: 120px;


#red-circle {

background-color: red;


#blue-circle {

background-color: blue;


#yellow-circle {

background-color: yellow;





<div class="circle" id="red-circle"></div>

<div class="circle" id="blue-circle"></div>

<div class="circle" id="yellow-circle"></div>

<script type="text/javascript">

	documnet.getElementById("red-circle").onclick = function() {
		document.getElementById("red-circle").style.display = "none";



documnet.getElementById("red-circle").onclick = function() {

find out the typo

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.