-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal_capt_test.php
More file actions
executable file
·73 lines (71 loc) · 1.97 KB
/
local_capt_test.php
File metadata and controls
executable file
·73 lines (71 loc) · 1.97 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
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
<?php
/**
* Created by PhpStorm.
* User: Jerry
* Date: 2016/11/18
* Time: 上午8:52
*/
?>
<html>
<head>
<meta http-equiv="Content-Type" charset="UTF-8">
<title>Maxcell 广创 2016 投票</title>
<script src="./assets/js/jquery-2.1.1.min.js"></script>
<script>
function getCapt() {
$.ajax({
type: 'post',
url: 'localcaptcha.php',
data: {
'get_captcha': 1
},
success: function (msg) {
var ret = JSON.parse(msg);
$("#captcha").html(ret['captcha']);
console.log(ret['captcha']);
}
});
}
function testCapt() {
var cap = $("#captcha_text").val();
console.log(cap);
$.ajax({
type: 'post',
url: 'localcaptcha.php',
data: {
'test_captcha': cap
},
success: function (msg) {
var ret = JSON.parse(msg);
if (ret['status']) {
$("#msg").html("pass");
} else {
$("#msg").html("fail");
}
}
});
$.ajax({
type: 'post',
url: 'localcaptcha.php',
data: {
'status': 1
},
success: function (msg) {
console.log(msg);
}
});
}
</script>
</head>
<body>
<div>
<span id="captcha"></span>
<input type="text" id="captcha_text">
<button id="get_captcha" onclick="getCapt()">get</button>
<button id="test_captcha" onclick="testCapt()">test</button>
<span id="msg"></span>
</div>
<div>
<iframe height="600" width="1000" src="http://www.bilibili.com/html/html5player.html?aid=212109&cid=344380"></iframe>
</div>
</body>