当前位置:网站首页>BOM - location, history, pop-up box, timing
BOM - location, history, pop-up box, timing
2022-07-06 04:11:00 【Sugar ^o^】
One 、History
- Window History Back
history.back() Method loads the previous... In the history list URL. It is equivalent to clicking the back button in the browser .
- Window History Forward
history forward() Method loads the next in the history list URL. Equivalent to clicking the forward button in the browser .
Two 、 pop-up
- Warning box
If you want to ensure that information is passed to users , Warning boxes are usually used .
When the warning box pops up , The user will need to click “ determine ” Come on .
window.alert(“sometext”); window.alert() The method can be without window Prefix to write .
- Confirmation box
If you want users to verify or accept something , Usually use “ confirm ” box .
When the confirmation box pops up , Users will have to click “ determine ” or “ Cancel ” To carry on .
If the user clicks “ determine ”, This box returns true. If the user clicks “ Cancel ”, This box returns false.
grammar window.confirm(“sometext”);
window.confirm() The method can be without window Prefix to write .
- Prompt box
If you want the user to enter a value before entering the page , Usually use the prompt box .
When the prompt box pops up , The user will have to enter a value and click “ determine ” Or click on “ Cancel ” To carry on .
If the user clicks “ determine ”, This box returns the entered value . If the user clicks “ Cancel ”, This box returns NULL.
window.prompt(“sometext”,“defaultText”);
window.prompt() The method can be without window Prefix to write .
3、 ... and 、Timing
setTimeout() Method
window.setTimeout(function, milliseconds); window.setTimeout() The method can be without window Prefix to write .
The first parameter is the function to execute .
The second parameter indicates the number of milliseconds before execution .
clearTimeout()
Method stops execution setTimeout() Functions specified in .
window.clearTimeout(timeoutVariable)
- setInterval() Method
setInterval() Method repeats a given function at each given time interval .
window.setInterval(function, milliseconds);
window.setInterval() The method can be without window Prefix to write .
The first parameter is the function to execute .
The second parameter is the length of the time interval between each execution .
clearInterval()
Method stop setInterval() Method .
window.clearInterval(timerVariable)
Four 、Location
- Window Location Href
window.location.href Property to return the URL
.
document.getElementById(“demo”).innerHTML = " Page location is " + window.location.href;
- Window Location Host name
window.location.hostname Property returns ( Current page ) The Internet host
The name of .
document.getElementById(“demo”).innerHTML = " The page hostname is " +
window.location.hostname;
- Window Location Pathname
window.location.pathname Property to return the Pathname
.
window.location.protocol Property to return to
web
agreementwindow.location.port Property returns ( Current page ) The number of the Internet host port .
window.location.assign() Method to load a new document .
边栏推荐
- About some basic DP -- those things about coins (the basic introduction of DP)
- [FPGA tutorial case 12] design and implementation of complex multiplier based on vivado core
- C language -- structs, unions, enumerations, and custom types
- [adjustable delay network] development of FPGA based adjustable delay network system Verilog
- POI add border
- Solution to the problem that the root account of MySQL database cannot be logged in remotely
- 关于进程、线程、协程、同步、异步、阻塞、非阻塞、并发、并行、串行的理解
- Detailed explanation of serialization and deserialization
- C mouse event and keyboard event of C (XXVIII)
- Développement d'un module d'élimination des bavardages à clé basé sur la FPGA
猜你喜欢
食品行业仓储条码管理系统解决方案
【PSO】基于PSO粒子群优化的物料点货物运输成本最低值计算matlab仿真,包括运输费用、代理人转换费用、运输方式转化费用和时间惩罚费用
【可调延时网络】基于FPGA的可调延时网络系统verilog开发
Custom event of C (31)
【按鍵消抖】基於FPGA的按鍵消抖模塊開發
【FPGA教程案例11】基于vivado核的除法器设计与实现
Network security - Security Service Engineer - detailed summary of skill manual (it is recommended to learn and collect)
MySql數據庫root賬戶無法遠程登陸解决辦法
Interface idempotency
How to modify field constraints (type, default, null, etc.) in a table
随机推荐
Esp32 (based on Arduino) connects the mqtt server of emqx to upload information and command control
Record the pit of NETCORE's memory surge
Comprehensive ability evaluation system
C (XXIX) C listbox CheckedListBox Imagelist
80% of the diseases are caused by bad living habits. There are eight common bad habits, which are both physical and mental
Determine which week of the month the day is
Cf464e the classic problem [shortest path, chairman tree]
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
lora网关以太网传输
查询mysql数据库中各表记录数大小
Database, relational database and NoSQL non relational database
asp. Core is compatible with both JWT authentication and cookies authentication
How to modify field constraints (type, default, null, etc.) in a table
Redis (replicate dictionary server) cache
Prime protocol announces cross chain interconnection applications on moonbeam
10 exemples les plus courants de gestion du trafic istio, que savez - vous?
TCP/IP协议里面的网关地址和ip地址有什么区别?
Security xxE vulnerability recurrence (XXe Lab)
Oracle ORA error message
Several important classes in unity