Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tetrashine/1e42bb34f89c6441ef3ce06e5cdabcb3 to your computer and use it in GitHub Desktop.
Save tetrashine/1e42bb34f89c6441ef3ce06e5cdabcb3 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>reCAPTCHA demo: Explicit render after an onload callback</title>
<script type="text/javascript">
var onloadCallback = function() {
grecaptcha.render('html_element', {
'sitekey' : 'your_site_key'
});
};
</script>
</head>
<body>
<form action="?" 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>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment