나는 textfield
을 가지고 있으며 textfield
이 hold three charactes
이 아닌 경우 제출 버튼을 비활성화합니다. 내가 지금하고 싶은 것은 textfield
굵은 빨간색의 윤곽선이며 여전히 submit
버튼이 비활성화되어 있습니다. 그러나 textfield
의 윤곽선을 그릴 수 없으며 동시에 button
을 제출할 수없는 것으로 보입니다.오류를 표시하는 jQuery 개요 텍스트 필드
제출 버튼을 사용 중지하기위한 코드는 다음과 같습니다. textfield
의 경우이 기능을 수행 할 때 length is < 3
의 윤곽을 그릴 수 있습니까? 어떤 도움 thankfull
는
$(function() {
$('input[name="updateMessage"]').attr('disabled','disabled');
$('input[name="selectMessageForUpdate"]').keyup(function(){
if($('input[name="selectMessageForUpdate"]').val().length < 3)
{
$('input[name="updateMessage"]').attr('disabled','disabled');
}
else
{
$('input[name="updateMessage"]').removeAttr('disabled');
}
});
});
아 예이는 작동 버튼을하지만 난 윤곽을 싶습니다 'textfield' 문자가'<3' @andreas 인 경우 – CodersSC
ok 내 대답을 편집했습니다 –
흠 이것은 여전히 작동하지 않습니다 :/ – CodersSC