📅  最后修改于: 2022-03-11 15:02:18.801000             🧑  作者: Mango
// The confirm function is used to display a dialog with ok and cancel. Usage:
var content = confirm("Hello"); // The "hello" means to show the following text
if (content === true) {
// Do whatever if the user clicked ok.
} else {
// Do whatever if the user clicks cancel.
}
// You can also use window.confirm()