You are here: irt.org | FAQ | JavaScript | Misc | Q1566 [ previous next ]
You can generate an alert message when the user clicks a link:
<a href="somepage.html" onClick="alert('You are now leaving my site')">Click here</a>
Or you could use a confirmation dialog box to confirm the request:
<a href="javascript:if (confirm('Are you sure')) location = 'otherpage.html'">Click here</a>