September 2024
Beginner to intermediate
985 pages
35h 37m
English
In the Hello World example, you have already seen how you can create simple output by calling the alert() function. However, there are several other options as well.
In addition to the already known hint dialog displayed by calling the alert() function (see Figure 2.25), the JavaScript language provides two more standard functions for displaying dialog boxes. The first one is the confirm() function. It’s used to display confirmation dialogs—that is, yes/no decisions (see Figure 2.26). In contrast to the hint dialog, the confirmation dialog contains two buttons: one to confirm and one to cancel the corresponding message. The second one is the prompt() function. This function opens ...
Read now
Unlock full access