Hi mvadukul,
Refer the below sample.
For more details you can refer the below link.
https://bootboxjs.com/documentation.html
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.4.0/bootbox.min.js"></script>
<script type="text/javascript">
function testAlert() {
event.preventDefault();
bootbox.alert({ size: "small", title: "Hello world!", message: "Your message here.", callback: function () { } });
}
function testeConfirm() {
event.preventDefault();
bootbox.confirm({ size: "small", message: "Are you sure to delete?", callback: function (confirmed) {
if (confirmed) {
bootbox.alert("Successfully Deleted");
} else {
bootbox.alert("Cancelled");
}
}
});
}
function testePrompt() {
event.preventDefault();
bootbox.prompt({ size: "small", title: "What is your name?", callback: function (result) {
if (result) {
bootbox.alert("Your Name is " + result)
}
}
});
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="submit" name="Button1" value="Alert" onclick="testAlert();" id="Button1" />
<input type="submit" name="Button2" value="Confirm" onclick="testeConfirm();" id="Button2" />
<input type="submit" name="Button3" value="Prompt" onclick="testePrompt();" id="Button3" />
</div>
</form>
</body>
</html>
Demo