当前位置:网站首页>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>
边栏推荐
- [Sylar] framework -chapter9-hook module
- set与list性能对比
- gerrit操作-回退掉某个patch_set
- Wang Shuang assembly language detailed learning notes 3: registers (memory access)
- RuntimeError: stack expects each tensor to be equal size, but got [8] at entry 0 and [2] at entry 2
- [Sylar] framework Chapter 6 collaborative scheduling module
- printf()打印char* str
- Seamless support for hugging face community, colossal AI low-cost and easy acceleration of large model
- Jupyter Notebook安装代码提示功能
- [Sylar] practical part - redis based parameter query service
猜你喜欢

王爽汇编语言详细学习笔记三:寄存器(内存访问)

01 node express system framework construction (express generator)

Web渗透之域名(子域名)收集方法

(克隆虚拟机步骤)

Password key hard coding check
![[每日一氵]上古年代的 Visual Studio2015 安装](/img/b1/066ed0b9e93b8f378c89ee974163e5.png)
[每日一氵]上古年代的 Visual Studio2015 安装

Machine learning and deep learning -- normalization processing

Space complexity calculation super full sorting!! (calculation of hand tearing complexity

Bio annotation of emotion analysis aste triples extraction

Internet of things industrial serial port to WiFi module wireless routing WiFi module selection
随机推荐
阿里巴巴面试题【杭州多测师】【杭州多测师_王sir】
Explain initialization list
What to do when encountering slow SQL? (next)
[yolov5 practice 5] traffic sign recognition system based on yolov5 -yolov5 integration pyqt5
[函数文档] torch.histc 与 paddle.histogram 与 numpy.histogram
Pyqt based grouping tool
【sylar】框架篇-Chapter6-协程调度模块
Ma Yi, Shen Xiangyang, Cao Ying's latest AI overview is hot! It took 3 months to build, netizens: required papers
Reading of a unified generic framework for aspect based sentimental analysis
np. unravel_ Index() finds the index value of an element (or group of elements) of the array after being pulled into one dimension. The corresponding index value in the original dimension (or specify
Important SQL server functions - other functions
Nat fundamentals and private IP
Destructor of member function
物联网工业串口转WiFi模块 无线路由WiFi模块的选型
np. The data returned from delete details is the data after deleting the specified dimension
Performance comparison between set and list
高数_第4章__曲线积分_习题解法
[Sylar] framework -chapter15 stream module
低代码是开发的未来吗?浅谈低代码平台
transform: failed to synchronize: cudaErrorAssert: device-side assert triggered