I am currently creating a page in html, but I would like you to click on the main button to close a window, I mean ...
and that I get a popup window with a message of caution ... I found that they do with javascript but with a button or link, but there will be to be treated directly with the main button to close.
<!DOCTYPE html>
<html>
<head>
<title>emergente</title>
</head>
<script type="text/javascript">
window.addEventListener("beforeunload", function (e) {
var confirmationMessage="\o/";
e.returnValue= confirmationMessage;
return confirmationMessage;
});
</script>
<body >
</body>
</html>