라디오 버튼 체크

by 조쉬 posted Mar 01, 2014
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script language="JavaScript">
<!--
function radiocheck(){
var frm = document.form
    for(var i = 0; i < Frm.location.length; i++){
        if(Frm.location[i].checked){
            break;
        }
    }
    if(i == Frm.location.length){
        alert('체크 하삼.');
        return;
    }
}
//-->
</script>
 <form name="Frm">
<input type="radio" name="location" value="1">1
<input type="radio" name="location" value="2">2
<input type="radio" name="location" value="3">3
<input type="radio" name="location" value="4">4
<input type="radio" name="location" value="5">5
</form>
 <input type="button" value="테스트" onClick="radiocheck();">

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5