I had the need to display some legal blurb before handling a redirect to a different site, this is my current solution.
Improvement & update from original idea here.
Example use:
<a href="http://www.google.fr" data-confirm-link="Warning - you are leaving this site"></a>
Other solutions:
- https://stackoverflow.com/a/13557082/20302 (
onClick="return confirm(xxx)"
)