Confirm on a link:

onclick="return confirm('foo')";