How to have the browser play a clicking noise when a button is pressed?

There is couple of examples discussed on topic "how to play audio files"

But also may be the vibrate can do the trick for you
Dashboard buttons easy colour state change? - #49 by hotNipi