Vous confirmez?
<style> #confrmdiv { display: none; background-color: #eee; border-radius: 5px; border: 1px solid #aaa; position: fixed; width: 300px; left: 50%; margin-left: -150px; padding: 6px 8px 8px; box-sizing: border-box; text-align: center; } #confrmdiv button { background-color: #ccc; display: inline-block; border-radius: 3px; border: 1px solid #aaa; padding: 2px; text-align: center; width: 80px; cursor: pointer; float:none; } #confrmdiv .button:hover { background-color: #ddd; } </style> <script> function dialogEnregistrerSiModifié(){ document.getElementById('confrmdiv').style.display="block"; document.getElementById('oui').onclick = function(){ //alert('true'); document.getElementById('confrmdiv').style.display="none"; }; document.getElementById('non').onclick = function(){ document.getElementById('confrmdiv').style.display="none"; return false; }; } </script> <button onclick="dialogEnregistrerSiModifié()">confirmation</button> <div id="confrmdiv">Vous confirmez?<br/> <button id="oui">Yes</button> <button id="non">No</button> </div>