작은 문제가 있습니다. 제출시 양식의 유효성이 확인 된 다음 전송 중이지만 확인이 성공하면 제출 버튼 onClick을 비활성화해야합니다. 여기에 내 버튼 코드가 있습니다.
<button type="submit" class="btn btn-primary " id="submitBtn"><i class="fa fa-envelope"></i> Kişi Kayıt</button>
그리고 여기 내 jQuery 코드가 있습니다.
..... here is validation codes .....
submitHandler: function(form) {
$.ajax({
url: 'plugin/clientIssues.php?tU=1',
type: "POST",
data: $('#userReg').serialize(),
success: function(response) {
alert(response); // show response from the php script.
window.setTimeout('location.reload()', 300);
}
});
return false;
$form.submit();
}
});
내가 어디에 둘 수 있는지 아십니까
$('#submitBtn').hide();
유효성 검사가 정확하고 제출 버튼을 누르면?
성공 기능에서 :
success: function(response) {
alert(response); // show response from the php script.
$('#submitBtn').hide();
window.setTimeout('location.reload()', 300);
}
(개인적으로) 버튼을 비활성화하고 싶지만 :
success: function(response) {
alert(response); // show response from the php script.
$('#submitBtn').attr('disabled','true');
window.setTimeout('location.reload()', 300);
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다