The JavaScript confirm function is very similar to the JavaScript alert function. A small dialogue box pops up and appears in front of the web page currently in focus. The confirm box is different from the alert box. It supplies the user with a choice; they can either press OK to confirm the popup's message or they can press cancel and not agree to the popup's request.

Confirm Example











Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/Gzplsq8MH0M/14339