Principle: the Confirm () method is used to display a dialog box with the specified message and OK and Cancel buttons. If the user clicks the OK button, confirm () returns TRUE. If you click the Cancel button, confirm () returns false. Before the user clicks the OK button or the Cancel button closes the dialog box, it blocks all input from the user to the browser. When confirm () is invoked, execution of the JavaScript code is paused, and the next statement is not executed until the user responds.
Method One: Using the Confirm method of JS
<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%> <% String Path = Request.getcontextpath ()
;
String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/"; %> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
Note: You can use layer after proficiency
<! DOCTYPE html>
Method Two: Swing