June 2025
Beginner
817 pages
31h 30m
English
Previously, you used a standard alert() dialog for JavaScript output. In addition to that dialog, there are other ways to generate output. In this section, you’ll learn what other options you have and where you can use them.
In addition to the standard dialog alert(), there are two more dialogs: confirm() and prompt(). The confirm() dialog is the classic OK-cancel dialog with two buttons, while prompt() serves as a dialog for entering text. However, these standard JavaScript dialogs are rarely used in practice because their layout depends on the underlying web browser, and the options to apply them are rather limited. Furthermore, the standard dialogs have the disadvantage ...
Read now
Unlock full access