- 1
I Need Help In My HTML GAME
In my new game that I made https://code.sololearn.com/WgFNSSC1psch/?ref=app I want to make it so that when you click the orange rectangle it gives you a point but if you accidentally click anything but the orange rectangle then you score goes back to zero. I tried to make the body onclick="lose()" then make the function turn your score to zero but then it doesn’t change the score if I click the rectangle. I need answers please.a
5 Respuestas
0
For ne it works normal
0
me•
0
hmm idk
0
This code doesn't reference the body. In JS reference the document using document. getElementByTag ("body")
Then set its onclick.
- 1
Yes I know the rectangle works but I can’t find out how to make the body onclick make your score go to Zero