<script> function checkOnly(chk){ var obj = document.getElementsByName("userSelect"); for(var i=0; i<obj.length; i++){ if(obj[i] != chk){ obj[i].checked = false; } } } </script> <input type="checkbox" name="userSelect" value="chk1" onClick="javascript:checkOnly(this);" />check1 <input type="checkbox" name="userSelect" value="chk2" onClick="javascript:checkOnly(this);" />check2
댓글 없음 :
댓글 쓰기