|
|
Ok!
|
|
|
Ok!
|
|---|---|---|---|---|
| 305 | Внутрь хед ставим
<script src="https://www.google.com/recaptcha/enterprise.js?render=6LfM-tUqAAAAAAK871StVSv4ssTIyIeOk7I7&hl=ru&badge=bottomleft"></script>
и
<script>
function onClick(e) {
e.preventDefault();
grecaptcha.enterprise.ready(async () => {
const token = await grecaptcha.enterprise.execute('6LfM-tUqAAAAAAK871StVSv4ssTsjweIyIeOk7I7', {action: 'SUBMIT'});
// IMPORTANT: The 'token' that results from execute is an encrypted response sent by
// reCAPTCHA to the end user's browser.
// This token must be validated by creating an assessment.
// See https://cloud.google.com/recaptcha/docs/create-assessment
});
}
</script>
После отправки формы в консоли Нетворк перейти по ссылке сгенерированного хеша | рекапча3, recaptcha v3 | 340070 | Рекапча версия 3 установка |
| 240 | document.addEventListener("DOMContentLoaded", function (event) {
setTimeout(function() {
let container = document.createElement("div");
container.classList.add('g-recaptcha');
container.setAttribute('id', 'g-recaptcha');
container.dataset.sitekey = '6Lc-rR0nAAAAAApbMeAGotqehDQZrx7IeUrAajI2';
let prev = document.querySelector('[name="form_hidden_45"]');
prev.after(container);
},0);
}); | JS, javascript, captcha | 120 | Добавить блок Капча после поля формы Яваскрипт |