Confirmationbox in javascript

show confirmationbox in javascript
In we need to show javascript confirmation box before doing some action.For example if we want to delete some record on the form, and we need users confirmation before deletion happens.

Sample code to show confirmation box in Javascript

<html xmlns="">
<head runat="server">
<script type="text/javascript">
function Confirmation() {
if (confirm("Do you want to delete record?") == true)
return true;
return false;
<form id="form1" runat="server">
<input type="button" value="Submit" onclick="return Confirmation();" />


Post a Comment