Javascript Popup

There are many ways of displaying popup messages using JavaScript, for example alert, confirm, prompt, open

Alert

An alert box will alert user with a message and an OK button.

Syntax of Alert Box

alert(“say something here”)

  • the word alert is a JavaScript keyword
  • you can write any value inside the parenthesis within the double quotes.

Example of Alert Box