You would select the element using whichever one of the several DOM element selection functions (.querySelector(), .getElementsByTagName(), .getElementsByClassName(), etc.) takes your fancy, attach an event listener for the click event, and then in the listener do whatever you want.
// document.querySelector('button.add') to select by class, or...
document.querySelector('button[type="submit"]').addEventListener('click', function(e) {
alert('The button was clicked.')
})
<button type = "submit">submit</button>
Note that if you had more than one button on the page then you would need to use .querySelectorAll() (or one of the other functions I mentioned) to return a list, then loop over the list to attach event handlers to each one. Or attach a handler to their common containing element. If you want to do something different for each then you need some way to distinguish between them, e.g., if they're in different containers or something.