"기타"라는 라디오 버튼이 있습니다.이 옵션을 선택하면 "기타 텍스트"라는 입력 필드가 나타납니다. 그것은 매우 간단하지만 나는 아침마다 실패했습니다. 실패의jquery를 사용하여 라디오 버튼을 선택하면 입력 필드를 표시하는 방법
jQuery(function(){
jQuery("input[name=other]").change(function(){
if ($(this).val() == "Yes") {
jQuery("#other-text").show()
}
else {
jQuery("#other-text").hide();
}
});
});
JSFiddle :
<input name="ocalls" type="radio" name="other" id="other-radio" value="Yes"><b>Other</b><br />
<input type="text" name="other-text" id="other-text" style="display:none" />
여기 내 자바 스크립트입니다. http://jsfiddle.net/Wpt3Y/532/
http://jsfiddle.net/Wpt3Y/537/ –