2010년 3월 10일 수요일

다중 라디오버튼 선택 검사하기

[code javascript]function isRadioUnselected(theRadio) { for (var i=0; i < theRadio.length; i++) { if (theRadio[i].checked) return false; } return true; } }[/code]

함수 호출 방법
[code javascript]if(isRadioUnselected(document.inputUser.build_type1 ) == true ) { alert("라디오버튼이 선택되지 않았습니다."); return false; }[/code]

댓글 없음:

댓글 쓰기