-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvery_intresting.html
More file actions
44 lines (41 loc) · 1.44 KB
/
Copy pathvery_intresting.html
File metadata and controls
44 lines (41 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<style type="text/css">
#rickroll {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
}
#background {
background-color: black;
}
</style>
</head>
<body id="background">
<title>奇怪的界面</title>
<h2 style="color: white;" id="undercover">🤔是不是没加载到?点击一下页面试试</h2>
<video id="rickroll" controls loop preload="metadata" playsinline>
<source src="./rick.mp4" type="video/mp4">
</video>
<script type="text/javascript">
// 等待2秒后再监听事件
async function main() {
var ricked = false;
function createVideo() {
document.getElementById("rickroll").style.display="block";
document.getElementById("rickroll").play();
}
document.addEventListener("click", function(e) {
if (ricked) return;
ricked = true;
createVideo(); // 调用创建视频的函数
document.getElementById("undercover").remove();
});
}
main();
</script>
</body>
</html>