Three kinds of bullet frames of js
js has three kinds of pop-up boxes, namely warning box, confirmation box and dialog box
Alert()
alert("你卡余额已不足,请及时充钱!!!")
effect
Confirm box confirm()
confirm("确认要分开吗?")
Effect
dialog prompt()
// 第一个参数是提示语,第二个参数是输入框默认值
let result = prompt("作者帅不帅呢?", ["确认过眼神,是个大帅逼."]);
// 前面定义了个变量result接收用户输入的值,这个值则可以通过变量进行引用,如下
console.log(result)
// 输出结果
确认过眼神,是个大帅逼.
effect