当前位置:网站首页>Document.readyState 如何使用和侦听
Document.readyState 如何使用和侦听
2022-06-21 22:54:00 【十月ooOO】
Document.readyState 如何使用和侦听
Document. readyState 有三种状态
loading: 文档还在加载中interactive: 文档主体内容已加载完成,但附属的图片、js、css 什么的还在载入中complete: 加载完成
侦听使用
document.onreadystatechange = event => {
console.log(event)
console.log(document.readyState)
}
当 document 状态发生变化时,会触发 docuemnt.onreadstatechange 事件,这个事件的内容如下:

document.onreadystatechange = event => {
console.log(event.timeStamp, document.readyState)
}
可以看到对应时间对应的事件变化:

边栏推荐
猜你喜欢
随机推荐
ARM32指令解析通用寄存器
im即时通讯源码+软件+app附详细封装视频搭建教程
Object partition
rabbit:do_ run_ postlaunch_ phase/0 line 932
Buuctf misc spy Apocalypse
【golang】Cannot convert expression of type ‘interface{}‘ to type ‘string‘(解决方案)
Hotline salon issue 26 - cloud security session
MySQL性能分析工具的使用
anaconda历史版本下载
buuctf misc 间谍启示录
Katalon framework test web (VIII) wait
Microservice test efficiency governance
笔记
katalon Recoder常用命令
8 种最坑SQL语法,工作中踩过吗?
MNIST image classification and comparison based on K-nearest neighbor
qt QMediaPlayer获取音频播放结束状态
诚邀 Elastic Stack 开发者成为 CSDN Elastic 云社区管理员
微博关闭发布多个兼职诈骗信息违规账号:如何打击数据造假灰产
Mathematical knowledge: greatest common divisor divisor


![[GXYCTF2019]SXMgdGhpcyBiYXNlPw==](/img/4d/f37968ce8ad1cd8112651e4215f464.png)






