-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (41 loc) · 1.47 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>reCAPTCHA Test</title>
</head>
<body>
<h1>Google reCAPTCHA Test</h1>
<p>
For available events, check out the <a href="https://github.com/richardszkcs/recaptcha-test">README</a>.
</p>
<div class="g-recaptcha"
data-sitekey="6Ldua2cUAAAAADQagbgv7vhmg5dY88UVk9Paa7CP"
data-callback="onCaptchaSuccess"
data-expired-callback="onCaptchaExpired"
data-error-callback="onCaptchaError"
></div>
<script>
// fired, when the reCAPTCHA is loaded
function onCaptchaLoad() {
console.log('onCaptchaLoad')
}
// fired, when the user submits a successful reCAPTCHA response
function onCaptchaSuccess(token) {
console.log('onCaptchaSuccess', token)
}
// fired, when the reCAPTCHA response expires and the user needs to re-verify
function onCaptchaExpired() {
console.log('onCaptchaExpired')
}
// fired, when the reCAPTCHA encounters an error
function onCaptchaError() {
console.log('onCaptchaError')
}
</script>
<script src="https://www.google.com/recaptcha/api.js?onload=onCaptchaLoad" async defer></script>
</body>
</html>