Basic idea is to use the JavaScript alert() function to display the information when a button (or a link) is clicked.
Before:
<form method="POST">
<input type=reset value="Test">
</form>
After:
Note the addition of
OnClick="alert( 'hello, world!' );"
<form method="POST">
<input type=reset value="Test" OnClick="alert( 'hello, world!' );">
</form>
Example: