confirm method js code example
Example 1: a href confirm javascript
<a href="delete.php?id=22" onclick="return confirm('Are you sure?')">Link</a>
Example 2: confirm javascript
if (window.confirm("Une nouvelle fenêtre va s'ouvrir.")) {
window.open("fenetre.html", "Nouvelle fenêtre", "");
}