나는 여기서 발견 한 것들을 기반으로 몇 시간 동안 다른 방법을 시도 해왔다. 누군가 나를 올바른 방향으로 조종 해 줄 수 있습니까? 확인란을 선택하거나 선택 취소 할 때 확인을 던지려면 확인란을 선택하거나 사용자 선택에 따라 선택을 취소합니다. 고맙습니다!체크 박스 체크 박스 체크 박스
$('input:checkbox').click(function(){
var checked = $("input:checked").length;
if (checked == 0){
if(confirm('Are you sure you want to discontinue this program?')){
(':checkbox:checked').removeAttr('checked');
}
} else
{
if(confirm('Are you sure you want to resume use of this program?'))
(':checkbox:checked').attr('checked');
}
HTML
리스너가 확인란을 아직 선택 또는 선택되어 실행<table>
<tr>
<td><input name="input" type="checkbox" value="" /></td>
<td>Because We Care</td>
</tr>
<tr>
<td><input name="" type="checkbox" value="" /></td>
<td>Some Unused Program</td>
</tr>
http://stackoverflow.com/questions/5944889/intercepting-checkbox-click-to-confirm-the-change 질문을 게시하기 전에 제대로 구글하시기 바랍니다 :이 당신을 위해 무엇을 찾고있는 정확하게해야한다 –