Previous Example-|-Next Example-|-Return to Chapter Listing

Example 12.3:
onclick: Adding a Confirmation

[This example works with Netscape Navigator 3 and Internet Explorer 3.]

You can add a confirmation to an onclick event (though it won't work with buttons). Click the following link.

The Naughty Bits


Here's the link: <A HREF="adult2.htm" onclick="return confirm('Remember, this page is for adults only. If you are under 18 or living in an area where such images are illegal, please do not continue. Click on Cancel to stop the transfer, or OK to go to the page.')">The Naughty Bits</a>
Previous Example-|-Next Example-|-Return to Chapter Listing