<script type="text/javascript"> ... if(confirm("Pregunta")) { //hacer esto }else{ //no hacerlo } ... </script>