Here we will learn with an HTML Example.
var my = confirm(“Do you want to Exit?”);
if( my == true )
alert(“Ok, Thank you Bye Bye.”);
alert(“Welcome back to system.”);
Here is the asp.net Button control code :
<input id=”Submit1″ type=”submit” value=”Confirm Box()” onclick=”mm()” />
Wen you click OK button on confirm box, Messagebox shows the “OK, Thank you Bye Bye”.
Wen you click Cancel button on confirm box, Messagebox shows the “Welcome back to System”.
I hope this HTML example of confirm box will help you……