当前位置:网站首页>The difference between alter and confirm, prompt
The difference between alter and confirm, prompt
2022-07-28 04:42:00 【If you don't study today, you will become a cured chicken tomor】
alter and confirm The difference between
1. Theoretical knowledge :
a. alter: Pop up warning box , Can only confirm alert(" This is a warning box ");
b. confirm Pop up the confirmation box , There are two buttons : To determine and cancel , Return respectively true and falseconfirm(" This is a confirmation box , Confirm to return true, Cancel return false");
c. prompt Pop up the prompt box , determine , Cancel , Input box , Determine the value of the return input box ( Do not enter blank ""), Cancel return Nullprompt(" This is a prompt box , OK to return the input value , Cancel return Null"," The default text in the input box ");
2. practice
<!DOCTYPE html>
<html>
<head>
<title> Pop up box test </title>
</head>
<body style="text-align: center;">
<h1> Pop up box test </h1>
<button onclick="test_1()"> Warning box </button>
<button onclick="test_2()"> Confirmation box </button>
<button onclick="test_3()"> Prompt box </button>
<p id="demo"></p>
</body>
<script> function test_1(){
alert((" This is a warning box ")); }// Clicking the warning box will give a warning , Execute downward after confirmation function test_2(){
test2 = confirm(" This is a confirmation box , Confirm to return true, Cancel return false"); document.getElementById("demo").innerHTML = test2; }// Clicking the confirmation box will give a warning , Execute downward after confirmation , Otherwise, do not execute downward function test_3(){
var test3 = prompt(" This is a prompt box , OK to return the input value , Cancel return Null"," The default text in the input box "); document.getElementById("demo").innerHTML = test3; }// Clicking the prompt box will give a warning , Execute downward after confirmation , Otherwise, do not execute downward , The input class content is returned to test3; </script>
</html>
边栏推荐
- Destructor of member function
- MySQL数据库————初识数据库
- 【sylar】框架篇-Chapter8-定时器模块
- MySQL:数据类型和运算符
- Information system project manager (2022) - key content: information system integrated testing and management, project management maturity model, quantitative project management (21)
- Is low code the future of development? On low code platform
- Object locking in relational database transactions
- Cloud native Devops status survey questionnaire solicitation: kodelurover launched jointly with oschina
- 字符串0123456789abcdef,子串(非空且非同串本身)的个数是多少【杭州多测师】【杭州多测师_王sir】...
- could only be written to 0 of the 1 minReplication nodes. There are 0 datanode(s) running and 0 node
猜你喜欢

Bio annotation of emotion analysis aste triples extraction

Password key hard coding check

Reading the paper "learning span level interactions for aspect sentimental triple extraction"

重要的 SQL Server 函数 - 其他函数

Use Baidu developer tool 4.0 to build a dedicated applet IDE

重要的 SQL Server 函数 - 日期函数

全方位分析STEAM和创客教育的差异化
![[每日一氵]上古年代的 Visual Studio2015 安装](/img/b1/066ed0b9e93b8f378c89ee974163e5.png)
[每日一氵]上古年代的 Visual Studio2015 安装

Wang Shuang assembly language detailed learning notes 3: registers (memory access)

Ma Yi, Shen Xiangyang, Cao Ying's latest AI overview is hot! It took 3 months to build, netizens: required papers
随机推荐
Ma Yi, Shen Xiangyang, Cao Ying's latest AI overview is hot! It took 3 months to build, netizens: required papers
Important SQL server functions - numeric functions
[II. Mobile web page development] 2D & 3D conversion and animation, mobile terminal layout, responsive layout
[Sylar] framework chapter -chapter10-address module
MySQL partition table transformation
[Sylar] framework -chapter11 socket module
Explain initialization list
How to upgrade a pair of 12.2 RAC(primary) and a pair of 12.2 RAC(dataguard) to 19c
CMake使用基础汇总
Reading the paper "learning span level interactions for aspect sentimental triple extraction"
[Sylar] framework -chapter9-hook module
What to do when encountering slow SQL? (next)
Render the data obtained from the database to the table in elementui
字符串0123456789abcdef,子串(非空且非同串本身)的个数是多少【杭州多测师】【杭州多测师_王sir】...
【sylar】框架篇-Chapter12-ByteArray 模块
Study notes of Gu Yujia on July 27, 2022
pytorch_ Lightning in lightning_ The output of hparams.yaml in logs is null
Important SQL server functions - date functions
25 openwrt guest network add
Simple summary of Modbus Protocol