我在單個頁面上使用Google reCAPTCHA的兩種表單。重置多個Google reCAPTCHA
每當我使用grecaptcha.reset();
它只會重置第一個實例。
下JS渲染驗證碼(S)
var recaptcha1;
var recaptcha2;
var myCallBack = function() {
//Render the recaptcha1 on the element with ID "recaptcha1"
recaptcha1 = grecaptcha.render('recaptcha1', {
'sitekey' : '1234', //Replace this with your Site key
'theme' : 'light'
});
//Render the recaptcha2 on the element with ID "recaptcha2"
recaptcha2 = grecaptcha.render('recaptcha2', {
'sitekey' : '1234', //Replace this with your Site key
'theme' : 'light'
});
};
如何重置所有實例或針對特定的實例。