While you find a way to make an example out of your code, here are some tutorials you could follow for the effects you requrie.
In the meantime you may want to have a look at the following tutorials:
https://www.w3schools.com/jsref/event_onclick.asp For your Click Event
https://www.w3schools.com/js/js_htmldom_css.asp For your color change
https://www.w3schools.com/js/js_htmldom_html.asp To change the ?'s to numbers
If you have any more questions, please let me know. In thread please.