About 3,160,000 results
Open links in new tab
  1. JavaScript Popup Boxes - W3Schools

    JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box. An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click "OK" to proceed. The window.alert() method can be written without the window prefix. alert ("I am an alert box!");

  2. Window prompt() Method - W3Schools

    Prompt for a user name and output a message: "Hello " + person + "! How are you today?"; More examples below. The prompt() method displays a dialog box that prompts the user for input. The prompt() method returns the input value if the user clicks "OK", otherwise it returns null. A prompt box is used if you want the user to input a value.

  3. Window: alert() method - Web APIs | MDN - MDN Web Docs

    Oct 4, 2023 · Learn about the Window.alert() method, including its syntax, code examples, specifications, and browser compatibility.

  4. Window: prompt() method - Web APIs | MDN - MDN Web Docs

    Feb 20, 2025 · window.prompt() instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.

  5. JavaScript Message Boxes: alert (), confirm (), prompt ()

    JavaScript provides built-in global functions to display popup message boxes for different purposes. alert (message): Display a popup box with the specified message with the OK button. confirm (message): Display a popup box with the specified message with OK and Cancel buttons.

  6. Interaction: alert, prompt, confirm - The Modern JavaScript Tutorial

    Sep 8, 2020 · As we’ll be using the browser as our demo environment, let’s see a couple of functions to interact with the user: alert, prompt and confirm. This one we’ve seen already. It shows a message and waits for the user to press “OK”. For example: The mini-window with the message is called a modal window.

  7. How to Create Alert, Prompt, Confirm Dialog Boxes Using JavaScript ...

    Jun 7, 2021 · Learn how to create alert, prompt and confirm dialog boxes using JavaScript along with syntax, example code and how it looks on a browser. Alert box is to show a message, prompt dialog box is to show a customized text message based on user input and a confirm dialog box is to confirm a user action on a webpage.

  8. Popup boxes using alert(), confirm() and prompt() - HTML Shark

    Alert boxes are popup-messages, where you can only click OK, when you have read it. The syntax is window.alert(), or just alert(). A button that displays a message upon click, looks like this as code:

  9. Difference between alert box and prompt box in JavaScript

    Apr 19, 2022 · Alert box : An alert box is one type of popup boxes in JavaScript which is often used to make sure that information have come through the user. So, the user will have to click “OK” to proceed when an alert box pops up on the window. Syntax : Another syntax to …

  10. JavaScript Popup Boxes: Alert(), Prompt(), & Confirm() Methods

    Mar 29, 2024 · The alert(), prompt() and confirm() method displays multiple kinds of dialog boxes. In this tutorial, we will learn about these methods with the help of practical examples. JavaScript alert() Method. The alert() method in JavaScript is used to show a virtual alert box that provides a message or warning to the user.

  11. Some results have been removed
Refresh