How to show a confirm dialog
Description
confirm(msg)
displays a OK/Cancel prompt dialog.
Example
<!DOCTYPE HTML>
<html>
<!--from www . j a v a 2s .c om-->
<body>
<script type="text/javascript">
if (confirm("Are you sure?")) {
document.writeln("I'm so glad you're sure! ");
} else {
document.writeln("I'm sorry to hear you're not sure. ");
}
</script>
</body>
</html>