Types of Popups
Displays a message to the user. Example:
alert() method. Here's an example:
Asks the user to confirm something. Often, this is in conjunction with another (potentially significant) action that the user is attempting to perform. Example:
confirm() method. Here's an example:
Prompts the user for information. Example:
prompt() method. Here's an example:
Note that the user's browser determines what the popup box actually looks like. This is because our popup code is simply telling the browser to "display this type of popup with this message". It is up to the browser to render the correct type of popup with the specified message.
The following lesson explains this in more detail.
Enjoy this page?
- Link to this page (copy/paste into your own website or blog):
- Link to Quackit using one of these banner ads.
Thanks for supporting Quackit!