[英]How disable / Enable rechatcha based on uncheck or check from checkbox
I want to disable/enable rechatcha based on uncheck/check from checkbox if unchecked then rechatcha should be disabled; 我想基于取消选中/从复选框选中/禁用复选框,如果未选中则应禁用rechatcha; if checked then rechatcha can checklist.
如果选中,那么rechatcha可以检查清单。
This is my code with checkbox and rechatcha 这是我的带有复选框和rechatcha的代码
<input type="checkbox" name="check2" value=""> Saya Menyatakan Bahwa Data Adalah Benar<br/></h5></B>
<div class="form-group">
<div class="col-sm-4">
<div class="g-recaptcha" nama = "capcay" id ="capcay" data-sitekey="6LfmhHQUAAAAAIhfG-Vhiq4FN1_VPGgARvtlmWsA">
</div>
</div>
</div>
Did'nt test it, but maybe you can use JavaScript to just hide it? 没有测试它,但是也许您可以使用JavaScript来隐藏它?
document.getElementsById("captcha").setAttribute("style", "display:none;");
(don't forget to also give the ID captcha to the proper element. (不要忘了也将ID验证码赋予适当的元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.