-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
114 lines (112 loc) · 5.67 KB
/
index.html
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="CPS测试,点击速度测试,手速测试,免费测试">
<meta name="description" content="CPS测试,点击速度测试,手速测试,免费测试">
<title>CPS测试</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdui/1.0.2/css/mdui.min.css"/>
</head>
<body class="mdui-theme-primary-indigo mdui-theme-accent-blue mdui-theme-layout-auto">
<div class="mdui-container">
<br>
<center>
<div class="mdui-chip">
<span class="mdui-text-center mdui-chip-title">这是一个CPS测试网页</span>
</div>
<div class="mdui-card mdui-m-t-1" style="width: 60%;min-width: 300px;">
<div class="mdui-card-content"><i class="mdui-icon material-icons mdui-text-color-red mdui-m-b-2">error</i> tip:点击按钮就开始测试了!</div>
<div id="match" style="display: block;">
剩余时间:<span id="time">10</span>s 点击次数:<span id="times">0</span>次
<div class="mdui-col mdui-p-l-2 mdui-m-t-1 mdui-p-r-2 mdui-m-b-4" style="max-width: 500px;">
<button id="start" onclick="start()" class="mdui-btn mdui-btn-raised mdui-btn-block mdui-color-theme-accent" style="height: 100px;"><h1>单击开始</h1></button>
</div>
</div>
<div id="match1" style="display:none">
<h3>测试结束</h3>
<h4>您的CPS为:<span id="match2">Null</span></h4>
<br>
<h4>该成绩为10秒平均点击速率。</h4>
<button onclick="document.getElementById('match1').style.display='none';document.getElementById('match').style.display='block';document.getElementById('times').innerHTML = 0;jc = 0;" class="mdui-btn mdui-btn-raised mdui-color-theme-accent mdui-m-b-2">重新测试</button>
</div>
<br>
由Ryan Team强势驱动
<div class="mdui-panel mdui-panel-gapless mdui-m-t-1" mdui-panel>
<div class="mdui-panel-item">
<div class="mdui-panel-item-header">更多操作选项
<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
</div>
<div class="mdui-panel-item-body">
<div class="mdui-btn-group mdui-m-t-1">
<a href="javascript:history.back();"><button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent">返回前页</button></a>
<a href="/"><button class="mdui-m-l-1 mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent">返回首页</button></a>
</div>
<div class="mdui-btn-group mdui-m-t-1">
<button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent" mdui-dialog="{target: '#aboutPages'}">关于本页</button>
</div>
</div>
</div>
</div>
</center>
<div class="mdui-dialog" id="aboutPages">
<div class="mdui-dialog-title">关于 About</div>
<div class="mdui-dialog-content">本页面由 @Python_Ryan 开发<br>框架使用开源项目:MDUI<br>本页仓库:<a href="https://github.com/Ryan83602/CPS-Test" target="_black">CPS-Test</a><br>网页由Ryan Team和Python_Ryan本人强势驱动<br>Ryan Team CPS Test协会提供技术支持</div>
<div class="mdui-dialog-actions">
<button class="mdui-btn mdui-ripple" mdui-dialog-close>关闭</button>
</div>
</div>
</div>
<script>
var jc = 0
function start(){
var times =document.getElementById('times');
if (jc == 0){
id = window.setInterval("time()",1000);
document.getElementById('start').innerHTML = "<h1>点我</h1>";
}
if (document.getElementById("time").innerHTML != "No time"){
jc = jc + 1;
times.innerHTML = jc;
}else{
}
}
function time(){
var time = document.getElementById("time");
if (time.innerHTML == 0){
time.innerHTML = "No time" ;
document.getElementById('match').style.display="none";
document.getElementById('match1').style.display="block";
var times = document.getElementById('times').innerHTML;
document.getElementById('match2').innerHTML = times / 10;
clearInterval(id);
}else{
time.innerHTML = time.innerHTML-1;
}
if (time.innerHTML == 5){
document.getElementById('start').innerHTML = "<h1>还有5秒!</h1>";
}
if(time.innerHTML == 3){
document.getElementById('start').innerHTML = "<h1>还有3秒!</h1>";
}
if(time.innerHTML == 2){
document.getElementById('start').innerHTML = "<h1>还有2秒!</h1>";
}
if(time.innerHTML == 1){
document.getElementById('start').innerHTML = "<h1>还有1秒!</h1>";
}
if(time.innerHTML == 0){
document.getElementById('start').innerHTML = "<h1>时间马上到了!</h1>";
}
if(time.innerHTML == "No time"){
document.getElementById('start').innerHTML = "<h1>单击开始</h1>";
time.innerHTML = 10 ;
}
if(time.innerHTML == 4){
document.getElementById('start').innerHTML = "<h1>还有4秒!</h1>";
}
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mdui/1.0.2/js/mdui.min.js"></script>
</body>
</html>