javascript (*Whats wrong with this Javascript code hurry plz) i have said that when i click on the checkbox, a check mark will a | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

javascript (*Whats wrong with this Javascript code hurry plz) i have said that when i click on the checkbox, a check mark will a

<div class="box"> <input type="checkbox" name="checkbox" id="checkbox" /><br><br> <i class="fa fa-check" aria-hidden="true" id="check-mark"></i> </div> <script type="text/javascript"> document.getElementById('checkbox').addEventListner("click",function () { var box1 = document.getElementById('check-mark'); if (box1.style.display=="none") { box1.style.display="block" } else{ box1.style.display="none" } }) </script>

8th Jun 2020, 6:22 PM
Syed Asheer
Syed Asheer - avatar
1 Answer
+ 1
You miss spelled addEventListener
8th Jun 2020, 6:36 PM
JME