-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcheck.html
41 lines (41 loc) · 1.22 KB
/
check.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>bn插件判别器</title>
</head>
<body>
<script>
function uploadandtest(){
var reader = new FileReader();
reader.onload = function()
{
var str = this.result
if(str!=undefined&&str.length>=10){
var httpRequest = new XMLHttpRequest();
httpRequest.open('POST', 'https://blocklunukkit-1488c9.service.tcloudbase.com/checkifEditor', true);
httpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
httpRequest.send(str);
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
var back = httpRequest.responseText;
if(back == "0"){
alert("非机制")
}else if(back == "1"){
alert("疑似机制")
}else if(back == "2"){
alert("确认机制")
}
}
};
}
}
var f = document.getElementById("sefile").files[0];
reader.readAsText(f);
}
</script>
<p>bn机制检测系统</p>
<input type="file" name="file" class="btn btn-outline-primary" id="sefile"></input>
<button onclick="uploadandtest()">进行检测</button>
</body>
</html>