Hola
yole:
Si lo has intentado, verás que no hay mucho misterio, simplemente unas cuantas condicionales y unos
confirm() hacen el trabajo:
Código PHP:
<input type="checkbox" id="chk" />
<script type="text/javascript">
function $(x) { return document.getElementById(x); }
$("chk").onclick = function() {
var comoQuedara = this.checked;
this.checked = comoQuedara;
if( comoQuedara ) {
this.checked = window.confirm("¿Está seguro que quieres marcarlo?");
}
else {
this.checked = !window.confirm("¿Está seguro que quieres desmarcarlo?")
}
}
</script>
Un saludo.