A more maintainable way of adding events is with event properties. Add the onclick property.

Make sure to pick ., followed by onclick.