Cách tích hợp captcha style2.track360.xyz (ok)
<html>
<head>
<title>reCAPTCHA demo: Explicit render for multiple widgets</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
var verifyCallback = function(response) {
console.log(response);
if(response){
grecaptcha.reset();
document.getElementById("mchimp-sucmessage").innerHTML = 'Success';
return false;
}else{
document.getElementById("mchimp-errmessage").innerHTML = 'Error';
return true;
}
};
var onloadCallback = function() {
grecaptcha.render('example3', {
'sitekey' : '6LfwmMgaAAAAANFNTFnb2XGDwNt5sQ-iGCGoMMR2',
'callback' : verifyCallback,
'theme' : 'dark'
});
};
jQuery(document).ready(function($) {
$('#mchimpmessage').click(function(event) {
event.preventDefault();
// grecaptcha.execute();
});
});
</script>
</head>
<body>
<!-- POSTs back to the page's URL upon submit with a g-recaptcha-response POST parameter. -->
<form action="https://style2.track360.xyz/" method="POST">
<div id="example3"></div>
<br>
<input type="submit" id="active-code-but" value="Submit">
<p id="mchimp-errmessage"></p>
<p id="mchimp-sucmessage"></p>
</form>
<script src="https://www.google.com/recaptcha/api.js?hl=vi&onload=onloadCallback&render=explicit" async defer></script>
</body>
</html>
Last updated