-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexplicitly.html
31 lines (28 loc) · 913 Bytes
/
explicitly.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
<html>
<head>
<title>reCAPTCHA demo: Explicit render after an onload callback</title>
</head>
<body>
<h3>
<a href="https://developers.google.com/recaptcha/docs/display#explicitly_render_the_recaptcha_widget">
Explicitly render the reCAPTCHA widget
</a>
</h3>
<form action="/signin" method="POST">
<div id="html_element"></div>
<br>
<input type="submit" value="Submit">
</form>
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer>
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script type="text/javascript">
var onloadCallback = function () {
grecaptcha.render('html_element', {
'sitekey': 'your_site_key'
});
};
</script>
</body>
</html>