I had working code that could reset my form when I click on a reset button. However after my code is getting longer, I realize that it doesn\'t work anymore.
A reset button doesn't need any script at all (or name or id):
and you're done. But if you really must use script, note that every form control has a form property that references the form it's in, so you could do: