JavaScript Alert Dialog Box

JS Alert dialog box:

An alert dialog box is used to give a warning message to the users. It pops up a message box dispalaying some contents with a OK button. JavaScript alerts are used in the following situations:

  • to see a message before doing anything on the website.
  • to warn the user abut something.
  • It can be used as an error indication.
  • To confirm some action.

Example :


Read Also: