Confirm dialog returns boolean value : confirm « Dialogs « JavaScript Tutorial






<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
var response = confirm("Do you want to proceed with this book?  Click OK to proceed otherwise click Cancel.");
alert(response)
//  -->
</script>
</head>
<body>

</body>
</html>








13.2.confirm
13.2.1.Confirm dialog
13.2.2.Confirm dialog returns boolean value
13.2.3.Use Confirm dialog in if statement
13.2.4.Use confirm method in if statement