أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Checkboxes have three state checked, unchecked and indeterminate, first two have default behavior.
try this
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js?ver=3.6.1'></script>
<input id='chk' type='checkbox' />
<script type='text/javascript'>
$(document).ready(function(){
$('#chk').click(function(){
if (this.readOnly==true){
this.checked=false;
this.readOnly=false;
}
else if (this.checked==false){
this.indeterminate=true;
this.readOnly=true;
}
});
});
</script>