js confirm

Thomas Stutz answered on January 27, 2023 Popularity 10/10 Helpfulness 10/10

Contents


More Related Answers


js confirm

6
Tip Thomas Stutz 1 GREPCC

The confirm() function in JavaScript displays a dialog box with a message and two buttons, OK and Cancel. The function returns true if the user clicks OK and false if the user clicks Cancel.

Here is an example of how to use the confirm() function:

In this example, a dialog box with the message "Are you sure you want to proceed?" is displayed. If the user clicks OK, the code in the first if block runs. If the user clicks Cancel, the code in the second if block runs.

Popularity 10/10 Helpfulness 10/10 Language javascript
Source: Grepper
Link to this answer
Share Copy Link
Contributed on Jan 27 2023
Thomas Stutz
0 Answers  Avg Quality 2/10


X

Sign in with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.