<SCRIPT language=JavaScript> <!-- var maxChecked = 3; //선택가능한 체크박스 갯수 var totalChecked = 0; // 설정 끝 function CountChecked(field) { if (field.checked) totalChecked += 1; else totalChecked -= 1; if (totalChecked > maxChecked) { alert ("최대 3개 까지만 가능합니다."); field.checked = false; totalChecked -= 1; } } function ResetCount(){ totalChecked = 0; } //--> </SCRIPT> 체크박스를 <script>document.write(maxChecked);</script>만 선택할 수 있습니다. <FORM action=# method=post name=Check> <INPUT name=Ants onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Bald onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Beards onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Bed onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Chins onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Flowers onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Flying onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Purple onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Teeth onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Thinking onclick=CountChecked(this) type=checkbox>http://www.xtx.kr<BR> <INPUT name=Vegetables onclick=CountChecked(this) type=checkbox>http://www.xtx.kr <BR> <INPUT name=Fear onclick=CountChecked(this) type=checkbox>http://www.xtx.kr <BR> <INPUT name=Everything onclick=CountChecked(this) type=checkbox>http://www.xtx.kr <BR><BR> <INPUT type=submit value=Submit> <INPUT onclick=ResetCount() type=reset value=Reset> </FORM>