Alert message box alert
The alert method has one parameter, which is the text string you want to display to the user. The string is not in HTML format. The message box provides an "OK" button for the user to close the message box, and the message box is a modal dialog box, that is, the user must close the message box before continuing.
window.alert("Welcome! Please press "OK" to continue.");
2. Confirm message box confirm
Use the confirmation message box to ask the user a "yes-or-no" question, and the user can choose to click OK button or click the Cancel button. The return value of the confirm method is true or false. The message box is also a modal dialog box: the user must respond to the dialog box (click a button) to close it before proceeding further.
var truthBeTold = window.confirm("Click "OK" to continue. Click "Cancel" to stop.");
if (truthBeTold) {
window.alert("Welcome to our Web page!");
} else window.alert("Goodbye!");
3. Prompt message box prompt
The prompt message box provides a text field in which the user can enter an answer in response to your prompt. The message box has an "OK" button and a "Cancel" button. If you provide an auxiliary string parameter, the prompt message box will display the auxiliary string in the text field as the default response. Otherwise, the default text is "
Similar to the alert() and confirm() methods, the prompt method will also display a modal message box. The user must close the message box before continuing
var theResponse = window.prompt("Welcome?","Please enter your name here.");
More alert(), For articles on the difference and usage of confirm() and prompt(), please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

SublimeText3 Chinese version
Chinese version, very easy to use

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
