I'm sure this has been asked before.
Basically, I'm creating an RPG calculator - what I wanted to know is if there is a way for me to assign an ID to certain button elements in HTML and check if they are clicked. The reason for this is so that I can keep everything under a single function, rather than spanning it over multiple functions like I would have done a year ago.
Any way for me to do such a thing?