I’m working on a simple project to practice Javascript. I want to make a reset button. It appears that Codepen won’t let you use the <form> tag to simply make a reset button. I tried to use some Javascript:
function reset() { document.getElementById("reset").reset();}
Does the Javascript need the form tag, too? Is there a way to use forms in Codepen?
We need to see the code. I assume you have an HTML typo on one of the buttons and they try to submit the form, but it’s impossible to tell. Also are you literally just trying to put the value of the select back to the first value?
I removed the form element because as soon as I added <form></form> , the game stopped working. When I hit the button to see who won, I get a “boomboom” error message from Codepen.