伙计们,我正在尝试通过recaptcha回调从按钮中删除disable属性,但该属性通过脚本为true时却不起作用。有人可以帮忙吗?代码如下。
function recaptchaCallback(){
$('#btnSubmit').removeAttr('disabled');
}
<form>
<fieldset>
<!-- reCaptcha -->
<div class="form-group text-center">
<label class="col-md-4 control-label"></label>
<div class="g-recaptcha col-md-4" data-sitekey="6Lf3JDAUAAAAAJ3Y4oPhVeuAx0K98sCCYju7HcT1" ></div <input type="hidden" class="form-control" data-recaptcha="true" required>
<div class="help-block with-errors"></div>
</div>
<!-- Button -->
<div class="form-group text-center">
<label class="col-md-4 control-label"></label>
<div class="col-md-4"><br>
<button id="btnSubmit" name="btnSubmit" type="submit" value="Submit" class="btn btn-success" data-callback="recaptchaCallback" disabled>SUBMIT <span class="glyphicon glyphicon-send"></span></button>
</div>
</div>
</fieldset>
</form>