Google reCAPTCHA
HTML
<script src="https://www.google.com/recaptcha/api.js"></script>
<div class="container">
<div id="recaptcha"></div>
</div>
<div id="email">
Verify captcha to get e-mail
</div>
CSS
.rc-anchor-pt{display:none;}
#recaptcha {
display: inline-block;
position: relative;
}
#recaptcha:after {
content: "";
display: block;
position: absolute;
z-index: 1;
bottom: 3px;
right: 5px;
width: 100px;
height: 70px;
background-color: #f9f9f9;
}
JavaScript
function createRecaptcha() {
grecaptcha.render("recaptcha", {sitekey: "6LcgSAMTAAAAACc2C7rc6HB9ZmEX4SyB0bbAJvTG", theme: "light", callback: test});
}
createRecaptcha();
function test() {
// ideally you would do server side verification of the captcha and then the server would return the e-mail
document.getElementById("email").innerHTML = "[email protected]";
}